Follow this step by step guide to get 'logs' from your system to Logit.io:
Step 1 - Installing
First, ensure that you have downloaded and installed Node.js (32 or 64 bit). You can get it from the official website, here. This includes various options to install including using an installer file (for Windows or Mac).
If you are just starting out with sending logs via Node.js there is a useful tutorial for creating an 'express' application to help get you up-and-running here.
Inside your project directory, open a terminal of your choice and type the following:
npm install [email protected] npm install [email protected]
Step 2 - Sending Logs
Step 3 - Check Logit.io for your logs
Now you should view your data:
If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.
Step 5 - Node.JS Logging Overview
Winston is the most popular logging library for Node.js as it makes logging more flexible & can be configured to multiple levels.
Winston is well known for its robust feature set & easy installation which we have detailed in this configuration guide. Morgan is commonly used in association with Winston and operates as an HTTP request logger middleware for Node.js.
Parsing, transforming & analysing emergency, critical & error Node.js logs can be hard to perform at scale from the default logging format. Priority messages can easily get lost in the noise of other logging formats (such as Info & Notice) and are not alerted on to be resolved by your wider DevOps team.
Logit.io provides a complete Node.js log analyser by default as part of our log management platform, this includes alerting, collection & visualisations enhancing your text logs to provide data-driven insights & real-time log tailing.
If you need any more assistance with migrating your Node.js data to Logstash we're here to help. Just get in contact with our support team via live chat & we'll be happy to assist.