1.3.1 • Published 3 years ago

@zaneray/express-logging v1.3.1

Weekly downloads
-
License
-
Repository
-
Last release
3 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

3 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.3.0

4 years ago

1.0.0

5 years ago

0.0.10

6 years ago

0.0.11

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.5

6 years ago

0.0.6

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago