UNPKG

@hoangnam.io/qa-tools

Version:

Logging, Error handling, Notifying for Express codebase

8 lines (7 loc) 435 B
# Nodejs Log Lib: support log to console, mongodb and google cloud logging 1. To log requests: using createLogMiddleware() 2. To log in general: using getLogger() ## How to use: 1. To disable log to console, set enableConsoleLog param to false 2. To enable log to mongo, pass mongoConfig: {connectionString, collectionName} 3. To enable send to to gg cloud: set env variable GOOGLE_APPLICATION_CREDENTIALS to service account file path