1.0.9 • Published 6 months ago

qogger v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Qogger

License: MIT npm version

Qogger is a versatile logging library for Node.js applications, providing colorful console output and debug capabilities.

Features

  • Colorful console output using chalk
  • Debugging support using debug
  • Various logging levels: log, chat, warning, error, highlight

Installation

Install the library using npm:

npm install qogger-library

Usage

Import the Qogger library and create a logger instance:

import Qogger from 'qogger-library';

const logger = Qogger('myLogger');

logger.log('This is a log message');
logger.chat('user', 'Hello, world!', 'room1');
logger.warning('This is a warning message', 2);
logger.error('This is an error message');
logger.highlight('This is a highlighted message');
logger.debug('This is a debug message');

API

Qogger(name)

Creates a new logger instance.

Parameters

  • name (string): The name of the logger instance.

Returns

  • An object with the following methods:

Methods

log(...args)

Logs a message to the console.

chat(name, message, room = "")

Logs a chat message with a name and optional room.

warning(msg, level = 1)

Logs a warning message with different levels of severity.

error(message, e = undefined)

Logs an error message with an optional error object.

highlight(...args)

Logs a highlighted message.

debug(message)

Creates a debug instance.

Contributing

Contributions are welcome! Please open an issue or submit a pull request. see the CONTRIBUTING.md file for details.

Version Management

When contributing to this project, be aware that the npm publish workflow automatically patches the version number in package.json and package-lock.json. After pushing your changes:

git push origin main

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.9

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago