@micc281/tslogger
v0.0.1
Published
A simple logging package.
Maintainers
Readme
TSLogger
TSLogger is a simple logging package for writing pretty looking messages to the console. This package can also dump all the messages it needs to into a file to ensure full logging.
Usage
To use TSLogger - despite the name - you can use Javascript and Typescript.
// Info logging.
Logger.info("Hello World!");
// Warn logging.
Logger.warn("Uh-oh!");
// Error logging.
Logger.error("Some error has occured");TSLogger allows for debug timers. This means that you can start a process then at the end of it print how long the process took to complete.
// Start some intensive process.
Logger.debugStart("complex process");
for (let i = 0; i < 10000000000000; i++) {
Logger.info(i);
}
Logger.debugEnd(); // Ends the most recent process.
// OUTPUT: Finished complex process in 15000ms