Added global time format and log timing controls using LoggingConfiguration
* Bench doc fixes * README fixes * Added test scripts in `tests/`
This commit is contained in:
16
tests/shutdown.ts
Normal file
16
tests/shutdown.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import Logging, { LoggingConfiguration, LogTiming } from "@proxnet/undead-logging";
|
||||
|
||||
//LoggingConfiguration.logTiming = LogTiming.Deferred;
|
||||
|
||||
const log = new Logging("Main");
|
||||
log.i(`Deferred! - LogTiming.${LogTiming[log.logTiming]}`);
|
||||
|
||||
const timeout = setTimeout(() => { log.d(`Interval!`) }, 2000);
|
||||
|
||||
Deno.addSignalListener('SIGINT', () => {
|
||||
clearTimeout(timeout);
|
||||
|
||||
LoggingConfiguration.resetLogTiming = LogTiming.Sync;
|
||||
|
||||
log.i(`Sync! - LogTiming.${LogTiming[LoggingConfiguration.logTiming]}`);
|
||||
});
|
||||
Reference in New Issue
Block a user