Comments (3)
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.
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.
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)
- Undesired time based rotation HOT 3
- Separating loggers and sinks HOT 8
- compilation error in set_formatter method HOT 2
- Combining expressions with parse_filter
- Logger is unbuffered HOT 3
- Detected memory leaks when use boost.log in sharted library. HOT 3
- log lib failed to build due to ERROR: AddressSanitizer: allocator is out of memory trying to allocate on MSVC in asan mode HOT 1
- logging may substantially exceed total_size HOT 9
- Build for Android fails with "error: unable to find library -lrt" HOT 2
- clang-15 warning: definition of implicit copy assignment operator for 'value_ref<jb::severity_level>' is deprecated because it has a user-declared copy constructor
- Performance issue: Boost.Log does a huge work when filtering records HOT 4
- Redirect log records to specific sink only HOT 4
- Max file rotating under the same target directory HOT 1
- BOOST_LOG_TRIVIAL cannot find overloaded `operator<<()` when it's declared in global scope HOT 2
- using BOOST_LOG_TRIVIAL << with string greater than max_size_decor results in bufferoverlfow detected HOT 3
- An infinite loop occurs when boost writes to the log file HOT 4
- Timezone information with text file backend HOT 2
- Boost.Log rotation may throw boost::filesystem::filesystem_error HOT 10
- How to add timezone info for log entries and log filename HOT 3
- Formatting TimeStamp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log.