This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

journl
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Journl

A beautiful logger that has a combination of both simple and advanced features.

Installation

Installation is simple. Simply run:

npm i journl

Usage

To start with Journl, import or require it as normal and create a new instance:

const Journl = require('journl');
const log = new Journl()

You can customise it by adding some options. Here's an example:

const log = new Journl({
    layout: '%type_short%: %message%',
    colors: {
        message: 'white',
        time: 'grey',
        types: {
            info: 'blue'
            // ...
        }
    }
})

More on customisation options later.

Methods

There are currently four methods available. These are:

  • log.info(message)
  • log.warn(message)
  • log.error(message)
  • log.success(message)

There are future plans to add more, and even allow custom methods.

Layout Options

If you would like to customise the layout of the logged messages, you can using the following syntax:

  • %message% - displays the message given.
  • %time% - displays the current time using HH:mm:ss.
  • %type% - displays the type of log (e.g: error).
  • %type_short% - displays the short type of log (e.g: i).

You can modify the layout using the layout option.

Package Sidebar

Install

npm i journl

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

5.11 kB

Total Files

8

Last publish

Collaborators

  • htbrown