A simple logger that just work.

Usage no npm install needed!

<script type="module">
  import logxx from 'https://cdn.skypack.dev/logxx';



Build Status Coverage Status Deps npm npm GitHub license

A simple logger that just work.


  • no dependency.
  • configurable log levels.
  • configurable appender. such as stdout, file and all writable streams.


$ npm install logxx -S


var logxx = require('logxx');


By default, logxx will output logs to stdout.


  • logxx

    It is a predefined 'standard' Logger accessible through helper functions, which are easier to use than creating a Logger manually.

    property default value
    log level logxx.L_INFO
    output process.stdout
  • log level

    log level description
    logxx.L_SILENCE output nothing
    logxx.L_ERROR output error only
    logxx.L_INFO output both error and info
  • creates a new logger

    Function: logxx.newLogger(level, output)

    The level variable sets the log level.
    value: logxx.L_SILENCE, logxx.L_ERROR, logxx.L_INFO default: logxx.L_INFO

    The output variable sets the destination to which log data will be written.
    type: streams.Writable, default: process.stdout.

  • more functions

    functions description
    logxx.info(anything) output normal message
    logxx.error(anything) output error message
    logxx.getLevel() return log level
    logxx.setLevel(level) set log level
    logxx.getOutput() return output appender
    logxx.setOutput(level) set output appender


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


this repo is released under the MIT License.