@arcjet/logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.13 • Public • Published
Arcjet Logo

@arcjet/logger

npm badge

Arcjet logging interface which mirrors the console interface but allows log levels.

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @arcjet/logger

Homepage

arcjet.com

Weekly Downloads

225

Version

1.0.0-alpha.13

License

Apache-2.0

Unpacked Size

18.7 kB

Total Files

6

Last publish

Collaborators

  • blaine-arcjet
  • davidmytton