Skip to content

A simple logging library with timestamp and chalk support

License

Notifications You must be signed in to change notification settings

npm-made-simple/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple logging library with timestamp and chalk support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published