0.0.10 • Published 3 years ago

@kensoni/log v0.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

node-log

Log file path and method called to terminal nodejs

Usage

This package only support Node environment.

Only import/require from main file of project.

With JavaScript:

// src/index.js
require('@kensoni/log');

// More code here

With Typescript:

// src/index.ts
import '@kensoni/log';

// More code here

Call __log() function anywhere that you want to show log.

__log();

Using as console.log:

__log(msg1, msg2, msg3, ...);

The format log message show to terminal

<time>ms [ <000> <line> :: <file path> ] <method> 👉 <message passed>

Demo:

Demo Show log

Note

This package always shows the log whether the environment is production or development.

To disable this feature without removing the code make sure that process.env.DEBUG_LOG_DISABLED flag is a truthy.

To change length of zero before line value. Let set process.env.DEBUG_LOG_MIN_COLUMNS (default: 6). If value less than 6, it will use default value.

This function with replace console.log if process.env.DEBUG_LOG_REPLACE_CONSOLE is truthy.

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago