### File

`src/app/_services/logging.service.ts`

### Index

###### Properties
canDebug env
###### Methods
sendDebugLevelMessage sendErrorLevelMessage sendFatalLevelMessage sendInfoLevelMessage sendLogLevelMessage sendTraceLevelMessage sendWarnLevelMessage

### Constructor

`constructor(logger: NGXLogger)`
Defined in src/app/_services/logging.service.ts:9
Parameters :
Name | Type | Optional
logger | `NGXLogger` | No

### Methods

sendDebugLevelMessage
`sendDebugLevelMessage(message: any, source: any, error: any)`
Defined in src/app/_services/logging.service.ts:22
Parameters :
Name | Type | Optional
message | `any` | No
source | `any` | No
error | `any` | No
Returns : `void`

sendErrorLevelMessage
`sendErrorLevelMessage(message: any, source: any, error: any)`
Defined in src/app/_services/logging.service.ts:38
Parameters :
Name | Type | Optional
message | `any` | No
source | `any` | No
error | `any` | No
Returns : `void`

sendFatalLevelMessage
`sendFatalLevelMessage(message: any, source: any, error: any)`
Defined in src/app/_services/logging.service.ts:42
Parameters :
Name | Type | Optional
message | `any` | No
source | `any` | No
error | `any` | No
Returns : `void`

sendInfoLevelMessage
`sendInfoLevelMessage(message: any)`
Defined in src/app/_services/logging.service.ts:26
Parameters :
Name | Type | Optional
message | `any` | No
Returns : `void`

sendLogLevelMessage
`sendLogLevelMessage(message: any, source: any, error: any)`
Defined in src/app/_services/logging.service.ts:30
Parameters :
Name | Type | Optional
message | `any` | No
source | `any` | No
error | `any` | No
Returns : `void`

sendTraceLevelMessage
`sendTraceLevelMessage(message: any, source: any, error: any)`
Defined in src/app/_services/logging.service.ts:18
Parameters :
Name | Type | Optional
message | `any` | No
source | `any` | No
error | `any` | No
Returns : `void`

sendWarnLevelMessage
`sendWarnLevelMessage(message: any, error: any)`
Defined in src/app/_services/logging.service.ts:34
Parameters :
Name | Type | Optional
message | `any` | No
error | `any` | No
Returns : `void`

### Properties

canDebug
Type : `boolean`
Defined in src/app/_services/logging.service.ts:9

env
Type : `string`
Defined in src/app/_services/logging.service.ts:8

    import { Injectable, isDevMode } from '@angular/core';
    import { NGXLogger } from 'ngx-logger';

    @Injectable({
      providedIn: 'root',
    })
    export class LoggingService {
      env: string;
      canDebug: boolean;

      constructor(private logger: NGXLogger) {
        // TRACE|DEBUG|INFO|LOG|WARN|ERROR|FATAL|OFF
        if (isDevMode()) {
          this.sendInfoLevelMessage('Dropping into debug mode');
        }
      }

      sendTraceLevelMessage(message: any, source: any, error: any): void {
        this.logger.trace(message, source, error);
      }

      sendDebugLevelMessage(message: any, source: any, error: any): void {
        this.logger.debug(message, source, error);
      }

      sendInfoLevelMessage(message: any): void {
        this.logger.info(message);
      }

      sendLogLevelMessage(message: any, source: any, error: any): void {
        this.logger.log(message, source, error);
      }

      sendWarnLevelMessage(message: any, error: any): void {
        this.logger.warn(message, error);
      }

      sendErrorLevelMessage(message: any, source: any, error: any): void {
        this.logger.error(message, source, error);
      }

      sendFatalLevelMessage(message: any, source: any, error: any): void {
        this.logger.fatal(message, source, error);
      }
    }

# result-matching ""

# No results matching ""