Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
timestamp,pid,level,system,message,args.
We will also not do any spacing formatting, which
is something the default formatter does.
A formatter like this might be really useful when
you need to sort logs by process id.
*/
"use strict";
// First we need to import AwesomeLog.
const Log = require("@awesomeeng/awesome-log");
// Next we need to expose the AwesomeLog.AbstractLogFormatter class which we
// will subclass in just a second.
const AbstractLogFormatter = Log.AbstractLogFormatter;
// So here we create our new writer class by subclassing
// AwesomeLog.AbstractLogFormatter.
//
// When you subclass AbstractLogFormatter you are required to implement
// two specific methods...
//
// constructor(options)
//
// format(logentry)
//
class MyExampleFormatter extends AbstractLogFormatter {
// Implement the constructor by just calling super.
// In most cases for formatter, this is fine.
constructor(options) {
super(options);