logging-gcp
v1.1.12
Published
Logging to GCP with winston
Downloads
28
Maintainers
Readme
Logging to GCP with winston
New Update
Support multi params
const logger = require('logging-gcp').init({
keyFilename: "<path-key-file>.json",
logName: "<log name to GCP Logging>"
});
// Supported add multi params
logger.info('Logging information data to gcp', params1 , params2, params3);
Support debug mode, hide log with mode testing or develop
#set NODE_ENV to environment
NODE_ENV=develop || DEVELOP
NODE_ENV=debug || DEBUG
// use debug mode
logger.debug('Logging information data to gcp', params1 , params2, params3);
Environment
NodeJS: >= 8.x.x
NPM: 6.14.x
Install
npm install logging-gcp
Usage
const logger = require('logging-gcp').init({
keyFilename: "<path-key-file>.json",
logName: "<log name to GCP Logging>"
});
//Logging with type info
logger.info('Logging information data to gcp');
//Logging with type warning
logger.warning('Logging warning message to gcp');
//Logging with type error
logger.error('Logging error message to gcp');
// Supported add multi params
logger.info('Logging information data to gcp', params1 , params2, params3);
Author
👤 Truong Anh Vo (@vophitruonganh)
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2020 - Truong Anh Vo. This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator