1.3.1 • Published 2 years ago

@zaneray/express-logging v1.3.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

ZaneRay Express Logging

  • A wrapper around Winston
  • Supports logging to Google StackDriver for deployed applications

Definitions

Environments

  • development
  • test
  • staging
  • prod

Transports (transports.js)

  • defines where to log in each Environment

Options (options.js)

  • defines how to log in each Environment

Log Levels - from Winston

  • 0: error
  • 1: warn
  • 2: info
  • 3: verbose
  • 4: debug
  • 5: silly

    Usage (see test/loggingTest.js)

in your environment

npm install --save @zaneray/express-logging

in your code.js

const logging = require("@zaneray/express-logging");

// set process.env.NODE_ENV in the runtime
// logger level and output method is determined by environment (see transports.js and options.js)
const logger = logging.create();

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");

//change log level to log warn and above
logging.setLevel("warn");
//show the current level
logger.warn(logging.getLevel());

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");
1.3.1

2 years ago

1.2.0

3 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.3.0

3 years ago

1.0.0

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago