mirror of
https://github.com/He4eT/cheap-glkote.git
synced 2026-05-05 08:57:25 +00:00
Add support for external loggers
This commit is contained in:
parent
d8af07c1be
commit
d9ded0c3d6
3 changed files with 25 additions and 11 deletions
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
class FakeDialog {
|
||||
constructor(handlers) {
|
||||
constructor(handlers, loggers) {
|
||||
this.streaming = false
|
||||
this.handlers = handlers
|
||||
}
|
||||
|
|
@ -32,7 +32,15 @@ class FakeDialog {
|
|||
}
|
||||
|
||||
log(message) {
|
||||
console.log(message)
|
||||
loggers.log(message)
|
||||
}
|
||||
|
||||
warning(message) {
|
||||
loggers.warn(message)
|
||||
}
|
||||
|
||||
error(message) {
|
||||
loggers.error(message)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue