Logger: improving the logger, and using it in client code.
This commit is contained in:
@ -94,7 +94,7 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
if (error instanceof ValidationError) {
|
||||
this.validationError = error
|
||||
}
|
||||
console.warn(`A validation error occurred in saving configuration. ${error.name}: ${error.message}`)
|
||||
this.logger.warn(`A validation error occurred in saving configuration. ${error.name}: ${error.message}`)
|
||||
this.ptNotifier.error(
|
||||
error.message
|
||||
? error.message
|
||||
|
@ -237,7 +237,7 @@ export class ChannelEmojisElement extends LivechatElement {
|
||||
a.click()
|
||||
a.remove()
|
||||
} catch (err: any) {
|
||||
console.error(err)
|
||||
this.logger.error(err)
|
||||
this.ptNotifier.error(err.toString())
|
||||
} finally {
|
||||
this.actionDisabled = false
|
||||
|
Reference in New Issue
Block a user