How to use the @awesomeeng/awesome-log.defineFormatter function in @awesomeeng/awesome-log

To help you get started, we’ve selected a few @awesomeeng/awesome-log 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 awesomeeng / awesome-log / examples / ExampleCustomFormatter / MyExampleFormatter.js View on Github external
// You dont actually need to export the class as its not getting used
// like that, but old habbits die hard.
//
module.exports = MyExampleFormatter;

// Final step is to register the writer with the Log system.
//
// We do this by giving it a common unique name, and the filename
// of the javascript file which exports the AbstractLogFormatter
// class.  If this is the same file we are currently in you can
// reference this as "module.filename".
//
// When the writer is used an instance of it will be created, and
// the various write, flush, close methods will be called.
//
Log.defineFormatter("my-example-formatter",module.filename);

@awesomeeng/awesome-log

AwesomeLog is a Log System for enterprise nodejs applications. It provides a basic out of the box logging solution that is ready to go with zero configuration but also gives you a highly configurable logging solution that with the power to do your logging

MIT
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis