Giter Site home page Giter Site logo

Comments (3)

Lastique avatar Lastique commented on August 26, 2024

BOOST_LOG_SEV is just a wrapper macro. You can format the message the way you want, if you to it manually, as in an example here. You can also write a stream manipulator for outputting your vector into a stream (an example is given here) or use Boost.Range with BOOST_LOG_SEV or any other logging macro.

Note that all that will create a single log record with all the contents you put in it. There may be limits imposed by syslog on the size of a single log record.

from log.

mrunmayi29 avatar mrunmayi29 commented on August 26, 2024

Thank you for your response. All these methods will send a single log record. Is there any way I can send multiple log records at the same time? I mean BOOST_LOG_SEV or any other macro sends only 1 record at a time. I have a vector of 1000 records. It will create 1000 network calls. Instead is it possible that I send 1000 (or more than 1) logs at a time to reduce network overload?

from log.

Lastique avatar Lastique commented on August 26, 2024

No, you'll have to loop over your vector and log entries one by one. There is no difference in terms of network load since syslog is UDP-based and each record is one UDP packet anyway.

from log.

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.