@made-simple/logging
TypeScript icon, indicating that this package has built-in type declarations

2.3.4 • Public • Published

Simple Logging @made-simple/logging


Logging with built-in timestamps and directly exporting chalk for formatting. Made to merge timestamps, logging, and chalk into one simple import.

Installation

npm install @made-simple/logging

Example Usage

const logger = require('@made-simple/logging');
import logger, { chalk } from '@made-simple/logging';
logger.deps(); // prints all dependencies neatly!

logger.log('This is a console log with a timestamp.');
logger.log(false, 'This is a console log without a timestamp.');
logger.error('This is a console error with a timestamp.');
logger.error(false, `This is a console ${chalk.red('error')} without a timestamp and red text.`);

import { TaggedLogger } from "@made-simple/logging";
const newLogger = new TaggedLogger("MyTag");
newLogger.log("This is a console log with a timestamp and a tag.");

// etc.

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Repository

Contributors

@alexasterisk

Package Sidebar

Install

npm i @made-simple/logging

Weekly Downloads

0

Version

2.3.4

License

MIT

Unpacked Size

16.1 kB

Total Files

5

Last publish

Collaborators

  • alexasterisk