@joelreuben2810/jml-logger
v1.0.4
Published
below is the code to initialise the logger
Downloads
2
Readme
JML logger
below is the code to initialise the logger
let { JML } = require(`jml-logger`)
let jml = new JML({
environment: <ENVIRONMENT>,
projectId: <GCP PROJECT ID>,
project: <PROJECT NAME>,
serviceAccount: <KEY FOR GCP SERVICE ACCOUNT WITH PUB SUB ADMIN ACCESS>,
topicName: <TOPIC NAME>,
})
in order to use the logger in you express app use the following code
app.use(jml.logRequestStart);
app.use(jml.logResponseBody);