How to use the ngx-logger.NgxLoggerLevel.ERROR 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
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.
   */
  handleFormSubmission() {
    this.logToConsole.emit(this.loggerForm.value);
  }
}
github syndesisio / syndesis / app / ui-react / packages / atlasmap-assembly / src / environments / environment.ts View on Github external
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
  // AtlasMap skips Maven classpath resolution if (classpath)
  classpath: ' ',
  production: false,
  xsrf: {
    headerName: 'SYNDESIS-XSRF-TOKEN',
    cookieName: 'SYNDESIS-XSRF-COOKIE',
    defaultTokenValue: 'awesome',
  },
  ngxLoggerConfig: {
    level: NgxLoggerLevel.ERROR,
    disableConsoleLogging: true
  },
};

/*
 * For easier debugging in development mode, you can import the following file
 * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
 *
 * This import should be commented out in production mode because it will have a negative impact
 * on performance if an error is thrown.
 */
// import 'zone.js/dist/zone-error';  // Included with Angular CLI.
github syndesisio / syndesis / app / ui-react / packages / atlasmap-assembly / src / environments / environment.prod.ts View on Github external
import { NgxLoggerLevel } from 'ngx-logger';

export const environment = {
  // AtlasMap skips Maven classpath resolution if (classpath)
  classpath: ' ',
  production: true,
  xsrf: {
    headerName: 'SYNDESIS-XSRF-TOKEN',
    cookieName: 'SYNDESIS-XSRF-COOKIE',
    defaultTokenValue: 'awesome',
  },
  ngxLoggerConfig: {
    level: NgxLoggerLevel.ERROR,
    disableConsoleLogging: true
  },
};
github jumpserver / luna / src / app / plugins / plugins.ts View on Github external
import {MaterialModule} from './MaterialModule.component';
import {NgxUIModule, SplitModule} from '@swimlane/ngx-ui';
import {LoggerModule, NgxLoggerLevel} from 'ngx-logger';
import {NgxDatatableModule} from '@swimlane/ngx-datatable';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgProgressModule} from 'ngx-progressbar';

export const PluginModules = [
  BrowserAnimationsModule,
  NgProgressModule,
  MaterialModule,
  LoggerModule.forRoot({serverLoggingUrl: '/api/logs', level: NgxLoggerLevel.DEBUG, serverLogLevel: NgxLoggerLevel.ERROR}),
  NgxDatatableModule,
  NgxUIModule,
  SplitModule
];
github bitpay / bitcore / packages / insight / src / environments / environment.prod.ts View on Github external
import { LoggerConfig, NgxLoggerLevel } from 'ngx-logger';
import { BCH, BTC, Chain, tBCH, tBTC } from '../app/types/chains';

const loggingSettings: LoggerConfig = {
  serverLoggingUrl: '/api/logs/insight',
  level: NgxLoggerLevel.DEBUG,
  serverLogLevel: NgxLoggerLevel.ERROR
};

const initialChain: Chain = BCH;

const expectedChains: Chain[] = [BCH, tBCH, BTC, tBTC];

export const environment = {
  apiPrefix: 'https://api.bitcore.io/api',
  ratesApi: 'https://bitpay.com/api/rates/bch',
  production: true,
  debugRouting: false,
  loggingSettings,
  initialDisplayValueCode: initialChain.code,
  initialChain,
  expectedChains,
  pollingRateMilliseconds: 60 * 1000
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
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);
        break;
      case NgxLoggerLevel.FATAL:
        this.logger.fatal(log.logMessage);
        break;
    }
  }
}