@dineroregnskab/express-logging
v1.6.0
Published
Logging utilities for Express framework
Downloads
8
Keywords
Readme
@dineroregnskab/express-logging
Logging utilities for Express framework.
const { expressErrorHandler, expressLogger } = require('@dineroregnskab/express-logging');
const express = require('express');
const app = express();
const serviceName = "ServiceName";
const version = "1.0.0";
app.use(expressLogger(serviceName, version));
app.get('/', (req, res) => {
res.send('Hello World');
});
app.use(expressErrorHandler(serviceName, version));
// Start server
app.listen(3000)