1.0.4 • Published 3 years ago

nicer-logging v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Nicer Logging

A simple yet nicer logging system.

Installation

# Install with NPM
npm i nicer-logging

What does it have?

It has symbols and colors (which can be disabled).

Example

JS

const nice = require('nicer-logging');

const log = new nice.Logger();

log.info(`Hello!`);

TypeScript and Modules

import Nice from 'nicer-logging';

const log = new Nice.Logger();

log.info(`Hello!`);

Documentation

Constructor

new Logger(options)

Options

ParameterTypeDescriptionOptionalDefault
useSymbolsBooleanWhether to use symbols when loggingtrue
useColorsBooleanWhether to use colors when loggingtrue

Methods

.info(content) | Parameter | Type | Description | Optional | |-----------|--------|-------------|----------|

| content | String | What to log | × |

.warn(content) | Parameter | Type | Description | Optional | |-----------|--------|-------------|----------|

| content | String | What to log | × |

.error(content) | Parameter | Type | Description | Optional | |-----------|--------|-------------|----------|

| content | String | What to log | × |

.log(content) | Parameter | Type | Description | Optional | |-----------|--------|-------------|----------|

| content | String | What to log | × |

.success(content) | Parameter | Type | Description | Optional | |-----------|--------|-------------|----------|

| content | String | What to log | × |

Yeah literally everything is the same