You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For developing this code, it would be nice to see important debugging messages
right away, without having to open the log file. However, I would like to keep
the messages in the log file as well.
I want to see a new config options: ASH_CFG_LOG_STDERR_LEVEL which sets a
logging visibility threshold that determines whether a message is logged to
stderr or not.
This is in addition to the logging threshold that determines whether a message
is logged to file.
Ideally, I would set my to-file threshold to be something like INFO and my
to-stderr level to be something like WARNING. That way, while using a
developmental release I can see warnings and errors right away but while also
maintaing a more detailed set of debugging info in a file.
The problem with the existing code is that the Logger inserts some data into a
ofstream and then returns it to the caller. At that point the caller can
insert a message (or messages) at will. The Logging code loses control of the
ostream.
What is needed is some kind of proxy ostream that contains two ostreams - one
open to the file and the other open to stderr. Instead of returning the
ostream to the file, we would return this proxy and whenever something is
inserted, we just check the various logging thresholds to determine whether to
insert the message into the appropriate streams.
Original issue reported on code.google.com by [email protected] on 27 Sep 2011 at 3:54
The text was updated successfully, but these errors were encountered:
This could be done by changing the flag parsing library to use the Google
gflags library: http://code.google.com/p/gflags/
This may also solve the stdlib segfault issue since my flag library is the
source of the crash.
Original issue reported on code.google.com by
[email protected]
on 27 Sep 2011 at 3:54The text was updated successfully, but these errors were encountered: