sematext / winston-logsene Goto Github PK
View Code? Open in Web Editor NEWWinston Transport for Logsene
Home Page: http://sematext.com/logsene
License: Apache License 2.0
Winston Transport for Logsene
Home Page: http://sematext.com/logsene
License: Apache License 2.0
There is a fairly large memory leak that is happening. I am unsure of the root cause, but you can see the memory leak in action here:
https://github.com/chrisblossom/memory-leak-example
There is also an issue when I have this in my development environment. It stops my node process from restarting and end up with this error:
27 Jul 10:56:48 - uncaughtException: c8841060f9114c6895e59c61d194b312
{ message: 'uncaughtException',
error:
{ [Error: listen EADDRINUSE :::3002]
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 3002 } }
Ideas?
Thank you!
See hughsk/flat#86
Apparently, that library is not maintained anymore, so it's probably a good idea to look for an alternative which doesn't suffer from such issues.
Reported by @clounie:
I'm having a problem where if the process quits too soon, none of the logs get sent. Here's the example:
https://gist.github.com/clounie/0d0b13477116deda3c000dbbd2d48952
My winston-logsene package is version 1.1.11, the latest I see on Github.
We switched from loggly to logsene, because of some memory issues of loggly with big ammount of data and logsene is working fine.
But winston-logsene is modifying our objects that we put into logger. I think this is big issue, the logger should never ever do anything with code, or if it is because of speed (you do not have to create copy of the whole object), it should be possible to turn it on/off in options.
Right now, the winston-logsene is adding "source" field to our object, when we are logging it. For example this code :
var myObj = {hi: 'I am simple object'};
console.log(myObj);
winston.info(myObj);
console.log(myObj);
is having this output
{ hi: 'I am simple object' }
info: hi=I am simple object
{ hi: 'I am simple object',
source: 'c:\\prace\\nodejs\\node-template\\node_modules\\winston-logsene\\lib\\index.js' }
Add a Native UI or Kibana 4 screenshot to README, below Usage.
I just started trying to use the example code with my test Logsene instance. Flush on exit does not appear to be working. So far the only way I've been able to get a log message to be sent in a barebones Node script is to add a 30-second timeout after the log (after reading through the source and seeing the periodic send call). I also read issue #10 and tried the workaround there with the dummy console transport, and have not been successful.
Based on my console.logs, send() of the underlying Logsene object is getting called on exit, but the callback from the http request never executes.
I have winston-logsene 1.2.0, winston 2.2.0, node 6.6.0. Thanks.
(To try to simplify the issue I went a layer down. The following works consistently.)
var Logsene = require('logsene-js');
var logger = new Logsene(process.env.LOGSENE_TOKEN);
logger.log('info', 'exit hook');
process.on('beforeExit', function () {
if (logger.logCount) {
logger.send();
}
});
Hi,
I've been trying to get the logs writing to the EU instance, but couldn't get it working. I've resorted to create an account on the US instance and it's working fine. Could you include instructions for configuring the module for the EU please?
Regards,
Andy
morgan-json
is a well-known vulnerable package, and this agent uses it. I suggest removing it and replacing with custom winston
transport, as right now, this vuln makes this soft unusable in production
if you copy and paste the readme it does not work, and the documentation on your site is out of date too...
when you first sign up it says to write
Use
To use the Logsene transport in winston, you simply need to require it:
var logger = require('winston');
var logsene = require('winston-logsene');
Pass an instance of the Logsene transport to the new winston logger:
logger.add(logsene, {
token: 'my-token',
});
Add logging code:
logger.debug('Hello, Logsene!');
logger.info('Hello, Logsene!');
logger.warn('Hello, Logsene!');
logger.error('Hello, Logsene!');
that gives errors unless you use [email protected]
the readme on this page gives more info but still does not work. without downgrading winston.
Using the winston console logger one can do log.error(new Error())
and the exception including stack will be printed to the console. However the same in winston-logsene results in an empty message and the error is lost.
Feedback from a Logsene user:
The winston-logsene transport would benefit from the handlesExceptions option.
Add winston-logsene to winston Transports https://github.com/winstonjs/winston/blob/c01add63e639d43573aeb3df4bc06cc70313317f/docs/transports.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.