Git Product home page Git Product logo

Comments (6)

gabime avatar gabime commented on May 18, 2024

The library does not support this. It could work, but it was not intended to be used this way.

from spdlog.

ruipacheco avatar ruipacheco commented on May 18, 2024

Do you think it's possible to add ZeroMQ as a sink? Or should I just write a message to a ZeroMQ socket and have a thread/process read from it and have that thread/process then write to spdlog?

from spdlog.

gabime avatar gabime commented on May 18, 2024

Both options seem reasonable. Simpler option would be send thru a named pipe to a reading process that would write to the file

from spdlog.

ruipacheco avatar ruipacheco commented on May 18, 2024

I'm concerned about the second option because of timestamps - there will be a difference.

If spdlog were to write to 0MQ what would be sent? The string I just wrote or some sort of data structure with more than just the message?

from spdlog.

gabime avatar gabime commented on May 18, 2024

I would just send the final formatted string to a named pipe which in turn would be consumed by a simple process that writes to file using spdlog ro directly. 0MQ is overkill for this.

This process can use spdlog to write to the actual file without reformatting the (already formatted) messages (set_formatter("%v")). This way the original timestamp would be preserved

from spdlog.

ruipacheco avatar ruipacheco commented on May 18, 2024

And then from 0MQ I'd have to write it to the file...

Ok, thanks, closing the issue.

from spdlog.

Related Issues (20)

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.