wakeflow-logger
v1.0.11
Published
wakeflow's logger used to send logs to GCP
Downloads
8
Maintainers
Readme
Intro
We use this repo to send logs to the Google Cloud Platform
Installation
npm i wakeflow-logger
Usage
import { Logger } from 'wakeflow-logger'
const logger = new Logger()
logger.info('this is info')
logger.warn('this is a warning')
logger.error('this is an error')
logger.error(new Error('hello error'))
try{
something()
}catch(err){
logger.error(err)
}
logger.info('you can also add a json payload',{payload:"this is a json payload"})
logger.info({payload:"or send only a json payload"})
Development mode
If you are working on your local machine, logs are sent to console.log
Only if NODE_ENV=production
do logs get sent to GCP
Viewing logs
To view your logs go to: https://console.cloud.google.com/logs
and enter the query labels.wakeflow="wakeflow"
Make sure you're looking at the correct GCP project.
👨💻 Visit us on www.wakeflow.io
💬 Chat with us on WhatsApp or our live chat
✉️ Email us