-
January 17th, 2011, 07:43 AM
#1
log library: Which one, proved and experienced would you advise?
Hello, the question is in the subject.
Some log libraries exist in C++, Log4cpp, log4cxx, Boost.Log...
But are those libraries widely used in industrial software production?
Thanks for your answers
-
January 18th, 2011, 04:29 AM
#2
Re: log library: Which one, proved and experienced would you advise?
Be aware that if your application has time critical sections or high priority threads, that the locking used by most logging libraries can have a detrimental effect on timing, by causing priority inversions when a low priority thread logs.
Ironically, it was after looking at the log files that we discovered that it was the logging that was causing the problem in the first place.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
January 20th, 2011, 04:09 AM
#3
Re: log library: Which one, proved and experienced would you advise?
Does anyone else have any views on logging libraries?
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
January 20th, 2011, 02:04 PM
#4
Re: log library: Which one, proved and experienced would you advise?
I wrote my own logger using regular FILE *s, pthread mutexes. They aren't terribly complicated and writing your own gives you absolute control over what gets logged.
-
January 20th, 2011, 02:47 PM
#5
Re: log library: Which one, proved and experienced would you advise?
Indeed implementing its own log lib allows doing exactly what you want.
But what I want is to earn time, and what I don't need is absolute control...
Moreover, I think a proved (because mature and used) library provides
- better efficiency about log system overhead
- better filter options
- easier configuration
- ...
And I also think a log system is not a purpose for a developer (or rarely, maybe for a log library developer), but a tool.
That's why I ask about a library.
-
January 21st, 2011, 03:38 AM
#6
Re: log library: Which one, proved and experienced would you advise?
Boost.Log may be a good bet if you want a library that may, in time, be integrated in to the standard C++ libraries.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
January 21st, 2011, 03:43 AM
#7
Re: log library: Which one, proved and experienced would you advise?
Originally Posted by ninja9578
I wrote my own logger using regular FILE *s, pthread mutexes. They aren't terribly complicated and writing your own gives you absolute control over what gets logged.
We wrote our own because of the timing difficulties I mentioned.We devised a low impact way of sending log data to a low priority thread that actually did the logging. Logging sections are enabled via a configuration file, including log levels.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|