Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.6 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.6 KB
Arcjet Logo

@arcjet/logger

npm badge

Arcjet lightweight logger which mirrors the Pino structured logger interface.

Installation

npm install -S @arcjet/logger

Example

import logger from "@arcjet/logger";

logger.debug("only printed in debug mode");
logger.log("only printed in log mode");
logger.warn("printed in default mode");
// printf-style printing
logger.error("printed always: %s", new Error("oops"));

Log levels

Log levels can be changed by setting the ARCJET_LOG_LEVEL environment variable to one of: "DEBUG", "LOG", "WARN", or "ERROR".

License

Licensed under the Apache License, Version 2.0.