What design pattern might apply to logging? What is normally used in this type of situation? Any good tutorials?

I am writing a client-server application using C89 and gcc 4.4.4. I now need 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 nothing else. For example, the user might not be interested in the debug messages on the screen output.