smart-loggerdeprecated

Another winston-based winston-killer

Usage no npm install needed!

<script type="module">
  import smartLogger from 'https://cdn.skypack.dev/smart-logger';
</script>

README

smart-logger

Logger with automatic console output formatting.
By default displays a short stack error - exclude node_modules and folders above of root module.

To enable smart formatting, you must register logger in an executable file from which it will be called:

    //index.js
    var Logger = require('smart-logger')
    var logger = new Logger(winstonConfig)

    var OtherClass = require('./OtherClass');
    var otherClass = new OtherClass(logger)

    //OtherClass.js

    module.exports = function OtherClass(logger) {
        this.logger = logger.reg()
    }

Details can be found in the directory test-project.

Example output

Example output