Giter Club home page Giter Club logo

Comments (5)

megastef avatar megastef commented on May 27, 2024

Did you set options.flushOnExit=true in the winston constructor?

from winston-logsene.

countergram avatar countergram commented on May 27, 2024

I tried setting flushOnExit: true in the add call and have now tried it on the Winston constructor as well. No change. It defaults to true, and in fact I don't think it can be set to false:

if (!options.flushOnExit) {
    options.flushOnExit = true
}

from winston-logsene.

megastef avatar megastef commented on May 27, 2024

Please let me know, how to reproduce it. How is your program terminated? Calling process.exit (which means no async code can be executed)?

Could you please post the output of npm ls - so we can check dependencies?

Here is what I did:

  1. Run the example https://github.com/sematext/winston-logsene/blob/master/example/index.js
    `node exaple/index.js``
    Output:
node example/index.js 
2016-09-25T17:58:36.327Z winston-logsene: start flushing 1 logs before exit ...
2016-09-25T17:58:36.788Z winston-logssene: flush before exit: 1 logs send.
2016-09-25T17:58:36.989Z winston-logsene: flush: no logs in buffer

Check logs in Logsene:

bildschirmfoto 2016-09-25 um 20 04 16

and Kibana
bildschirmfoto 2016-09-25 um 20 03 00

from winston-logsene.

megastef avatar megastef commented on May 27, 2024

Should be fixed, something changed in logsene-js log counts, and winston-logsene should watch own logCounts. 3a967ab

Even with latest logsene-js, it works again:

node example/index.js 
2016-09-25T19:04:08.075Z winston-logsene: start flushing 1 logs before exit ...
2016-09-25T19:04:08.568Z winston-logssene: flush before exit: 1 logs send.
2016-09-25T19:04:08.771Z winston-logsene: flush: no logs in buffer

from winston-logsene.

countergram avatar countergram commented on May 27, 2024

I tried with 1.2.1 and it works for me now. Thanks.

from winston-logsene.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.