1.1.0 • Published 3 years ago
@clovergaze/simple-logger v1.1.0
Simple Logger
A very simple Node module for logging messages with timestamps.
Install
npm install @clovergaze/simple-logger
Usage
import { SimpleLogger } from "@clovergaze/simple-logger";
const simpleLogger: SimpleLogger = new SimpleLogger();
// Log a message
simpleLogger.log("My message..");
// Retrieve log messages
simpleLogger.getLog().forEach((entry: SimpleLogger.Entry): void => {
console.log(`${entry.date} - ${entry.message}`);
});
// Clear log
simpleLogger.clearLog();
Development
For every development step, like continuous build mode, testing or releasing, everything must be built first.
Building
npm run build
This executes the Grunt build
task (via the default
task) that lints and transpiles the
sources.
Continuous build mode
npm run watch
Testing
npm test
This executes test cases inside the test
folder which use Mocha.
Releasing
npm run release
Cleaning
npm run clean
This removes all generated files and folders but does not touch the dist
folder or files it contains.
Bugs & Issues
Something is not working as intended? Please report bugs or issues on the corresponding GitHub page.
Author
Johannes Hillert (GitHub)
License
Copyright (c) 2017 Johannes Hillert. Licensed under the MIT license, see the included LICENSE file for details.