LogDNA is an enterprise-grade log management provider that offers a user-friendly UI and a simple pricing format. They provide multiple logging libraries that support multiple languages (e.g Nodejs, Python, Ruby, etc.) and integrations with 3rd party loggers like Winston, Bunyan, and Cloudwatch. In this case, I’m going to show you how to integrate express-winston with logdna-winston library to use it as a middleware logger with a Nodejs express application. Here is how you can implement it!

Let’s start by installing the dependencies:

npm install —-save winston logdna-winston express-winston

Create a file logger.js

Demiban Díaz Torres

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store