1.1.0 • Published 4 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-loggerUsage
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 buildThis executes the Grunt build task (via the default task) that lints and transpiles the
sources.
Continuous build mode
npm run watchTesting
npm testThis executes test cases inside the test folder which use Mocha.
Releasing
npm run releaseCleaning
npm run cleanThis 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.