Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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);