view log.h @ 41:92b59cfcf364 noffle

[svn] Replaces identical local server name strings by constant
author enz
date Fri, 05 May 2000 09:32:53 +0100
parents 04124a4423d4
children
line wrap: on
line source

/*
  log.h

  Print log messages to syslog, stdout/stderr.

  $Id: log.h 3 2000-01-04 11:35:42Z enz $
*/

#ifndef LOG_H
#define LOG_H

#include "common.h"

/*
  Initialise logging (required before using any log functions).
  name: program name for syslog
  interactive: print messages also to stderr/stdout
  facility: like syslog
*/
void
Log_init( Str name, Bool interactive, int facility );

/* Log level info */
void
Log_inf( const char *fmt, ... );

/* Log level error */
void
Log_err( const char *fmt, ... );

/* Check for cond being true. Otherwise log an error, and return 1. */
int 
Log_check(int cond, const char *fmt, ... );

/* Log level notice */
void
Log_ntc( const char *fmt, ... );

/* Log only if DEBUG is defined. */
void
Log_dbg( const char *fmt, ... );

#endif