Skip to content

aklinker1/logger

Repository files navigation

@aklinker1/logger

JSR NPM Version API Reference Install Size

Personalized logger for backends.

Preview

bun add @aklinker1/logger

Usage

import { createLogger } from "@aklinker1/logger";

const logger = createLogger("namespace");
logger.info("message", { params: any });

Log Level

Set the LOG_LEVEL env var equal to the minimum level you want to see:

LOG_LEVEL=warn my-script

Log Format

There are two log formatters:

  • Pretty (LOG_FORMAT=pretty): Default for development
  • JSON (LOG_FORMAT=json): Default in production environments where NODE_ENV=production

About

Personalized logger for backends.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors