diff options
Diffstat (limited to 'client/src/app/core/notification/notifier.service.ts')
-rw-r--r-- | client/src/app/core/notification/notifier.service.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/core/notification/notifier.service.ts b/client/src/app/core/notification/notifier.service.ts index 165bb0c76..15af5c1b6 100644 --- a/client/src/app/core/notification/notifier.service.ts +++ b/client/src/app/core/notification/notifier.service.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { MessageService } from 'primeng/api' | 1 | import { MessageService } from 'primeng/api' |
2 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
3 | import { logger } from '@root-helpers/logger' | ||
3 | 4 | ||
4 | @Injectable() | 5 | @Injectable() |
5 | export class Notifier { | 6 | export class Notifier { |
@@ -10,21 +11,21 @@ export class Notifier { | |||
10 | info (text: string, title?: string, timeout?: number, sticky?: boolean) { | 11 | info (text: string, title?: string, timeout?: number, sticky?: boolean) { |
11 | if (!title) title = $localize`Info` | 12 | if (!title) title = $localize`Info` |
12 | 13 | ||
13 | console.info(`${title}: ${text}`) | 14 | logger.info(`${title}: ${text}`) |
14 | return this.notify('info', text, title, timeout, sticky) | 15 | return this.notify('info', text, title, timeout, sticky) |
15 | } | 16 | } |
16 | 17 | ||
17 | error (text: string, title?: string, timeout?: number, sticky?: boolean) { | 18 | error (text: string, title?: string, timeout?: number, sticky?: boolean) { |
18 | if (!title) title = $localize`Error` | 19 | if (!title) title = $localize`Error` |
19 | 20 | ||
20 | console.error(`${title}: ${text}`) | 21 | logger.error(`${title}: ${text}`) |
21 | return this.notify('error', text, title, timeout, sticky) | 22 | return this.notify('error', text, title, timeout, sticky) |
22 | } | 23 | } |
23 | 24 | ||
24 | success (text: string, title?: string, timeout?: number, sticky?: boolean) { | 25 | success (text: string, title?: string, timeout?: number, sticky?: boolean) { |
25 | if (!title) title = $localize`Success` | 26 | if (!title) title = $localize`Success` |
26 | 27 | ||
27 | console.log(`${title}: ${text}`) | 28 | logger.info(`${title}: ${text}`) |
28 | return this.notify('success', text, title, timeout, sticky) | 29 | return this.notify('success', text, title, timeout, sticky) |
29 | } | 30 | } |
30 | 31 | ||