create logging so that the messages will be displayed on screen and logged to a file

Posted by robUK on Stack Overflow See other posts from Stack Overflow or by robUK
Published on 2010-05-29T17:32:07Z Indexed on 2010/05/29 17:42 UTC
Read the original article Hit count: 153

Filed under:
|

Hello,

gcc 4.4.4 c89

I am writing a client/server application. I have finished and now I want to implement some logging feature that will display log messages on the screen as well as log to a file.

However, I don't want to display all log messages (warning, error, critical, unrecoverable, debug, etc). Maybe I can set so that it will display, just errors and debug messages and nothing else. For example, the user might not be interested in the debug messages.

Is there any design-pattern that I can follow? What do you normally for for logging? Any tutorials out there that address logging?

many thanks for any suggestions,

© Stack Overflow or respective owner

Related posts about c

    Related posts about logging