How to use the ngx-logger.NgxLoggerLevel.TRACE function in ngx-logger

To help you get started, we’ve selected a few ngx-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dbfannin / ngx-logger / projects / demo / src / app / logger-form / logger-form.component.ts View on Github external
})
/**
 * The LoggerComponent allows a user to enter a message and log it using ngx-logger. The user can select the type of log message.
 * This component emits an event to the parent of the message and log type so the parent can perform the logging operation.
 */
export class LoggerFormComponent implements OnInit {
  @Output() logToConsole: EventEmitter = new EventEmitter();

  loggerForm = this.fb.group({
    logMessage: ['', Validators.required],
    logType: ['', Validators.required]
  });

  /* Used in the mat-select on the form */
  logTypes: LoggerSelectionOption[] = [
    {value: NgxLoggerLevel.TRACE, viewValue: 'Trace'},
    {value: NgxLoggerLevel.DEBUG, viewValue: 'Debug'},
    {value: NgxLoggerLevel.INFO, viewValue: 'Info'},
    {value: NgxLoggerLevel.LOG, viewValue: 'Log'},
    {value: NgxLoggerLevel.WARN, viewValue: 'Warn'},
    {value: NgxLoggerLevel.ERROR, viewValue: 'Error'}
  ];

  constructor(private fb: FormBuilder) {
  }

  ngOnInit() {
  }

  /**
   * Take the message and type of logging to be performed and emits it to the parent component.
   */
github dbfannin / ngx-logger / projects / demo / src / app / log-config / log-config.component.ts View on Github external
get loggerColor(): string {
    switch (this.currentLogLevel) {
      case NgxLoggerLevel.TRACE:
      case NgxLoggerLevel.DEBUG:
        return 'primary';

      case NgxLoggerLevel.INFO:
      case NgxLoggerLevel.LOG:
        return 'accent';

      case NgxLoggerLevel.WARN:
      case NgxLoggerLevel.ERROR:
      case NgxLoggerLevel.FATAL:
        return 'warn';

      default:
        return '';
    }
  }
github dbfannin / ngx-logger / projects / demo / src / app / app.component.ts View on Github external
handleLog(log: LogEvent) {
    switch (log.logType) {
      case NgxLoggerLevel.TRACE:
        this.logger.trace(log.logMessage);
        break;
      case NgxLoggerLevel.DEBUG:
        this.logger.debug(log.logMessage);
        break;
      case NgxLoggerLevel.INFO:
        this.logger.info(log.logMessage);
        break;
      case NgxLoggerLevel.LOG:
        this.logger.log(log.logMessage);
        break;
      case NgxLoggerLevel.WARN:
        this.logger.warn(log.logMessage);
        break;
      case NgxLoggerLevel.ERROR:
        this.logger.error(log.logMessage);
github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / models / config.model.ts View on Github external
isTraceEnabled(): boolean {
    return this.logger.getConfigSnapshot().level === NgxLoggerLevel.TRACE;
  }