Set log level to warn and don't log to STDOUT when in foreground.