BunyanLoggerConfig Class

Beta

Helps to configure the bentleyjs-core Logger to use bunyan. To use bunyan for logging output, the app should depend on the bunyan package. The app should create a bunyan logger and then call BunyanLoggerConfig.logToBunyan to direct Logger output to the bunyan logger.

To log to the console in bunyan format, the app can call the BunyanLoggerConfig.logToStdoutViaBunyan helper method. You can then pipe the output through the bunyan command-line program to format and filter it.

See SeqLoggerConfig to log to a seq server using bunyan.

Methods

Name Description
logToBunyan(blgr: any): void Static Initialize the logger streams to the specified bunyan logger.  
logToStdoutViaBunyan(loggerName: string): void Static Initialize the logger streams to stdout/stderr using bunyan format.  

Defined in

Last Updated: 08 January, 2020