0.0.2 • Published 6 years ago

@thecodeisgreen/logger v0.0.2

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

logger

Logger based on winston and winston-daily-rotate-file.

const logger = require("@thecodeisgreen/logger")

logger.info("saved", { data: { lastname: "Murray", firstname: "Bill" }});
logger.error("saved failed", { error: err.message });

Env var

namedescription
LOGGER_LOG_DIRlog directory
LOGGER_MAX_SIZEcheck maxSize option in https://github.com/winstonjs/winston-daily-rotate-file#readme
LOGGER_MAX_FILEScheck maxFiles option in https://github.com/winstonjs/winston-daily-rotate-file#readme