1.0.5 • Published 9 years ago
@platoai/log v1.0.5
platoai-log
Custom Winston logger format used by Plato AI.
installation
npm i -S @platoai/logusage
Optionally export the following shell environment variables:
PLATOAI_LOG_LEVEL, to:error,warn,info,verbose,debug, orsilly(defaults to:info)PLATOAI_LOG_IS_JSON, to:trueorfalse(defaults to:false)
const logger = require('@platoai/log');and then use it like winston:
log.info("Hello, world.");
// logs: `info: [greeter] Hello, world.`
log.info("Hello, world.", {prefix: "greeter"});