Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Once initialized, we have to start the log system.
Log.start();
// Once the log system is started you can make log statement against the
// various log levels, by default they are access, error, warn, info, debug.
Log.info("This is an example log message.");
Log.info("Another log message with arguments.",1,2,3);
Log.info({
text: "A log object.",
red: "red",
green: 25,
blue: false
});
// stop logging once we are done.
Log.stop();
formatter: "my-example-formatter",
options: {}
}]
});
// Then everything is exactly the same as basic usage.
//
// Start the log...
Log.start();
// Log something out to it...
// See the MyExampleCustomWriter.js file for implementation details.
Log.info("This is an example log message.");
// stop when we are done.
Log.stop();
name: "my-writer",
type: "my-example-writer"
}]
});
// Then everything is exactly the same as basic usage.
//
// Start the log...
Log.start();
// Log something out to it...
// See the MyExampleCustomWriter.js file for implementation details.
Log.info("This is an example log message.");
// stop when we are done.
Log.stop();
setTimeout(async ()=>{
children.forEach((child)=>{
Log.releaseSubProcess(child);
child.kill(0);
});
await Log.stop();
process.exit(0);
},1000);