Anope IRC Services  Version 1.8
Functions | Variables
log.c File Reference
#include "services.h"
#include "pseudo.h"
Include dependency graph for log.c:

Go to the source code of this file.

Functions

static int get_logname (char *name, int count, struct tm *tm)
 
static void remove_log (void)
 
static void checkday (void)
 
int open_log (void)
 
void close_log (void)
 
char * log_gettimestamp (void)
 
void alog (const char *fmt,...)
 
void log_perror (const char *fmt,...)
 
void fatal (const char *fmt,...)
 
void fatal_perror (const char *fmt,...)
 
void fatal_sockerror (const char *fmt,...)
 

Variables

static FILE * logfile
 
static int curday = 0
 

Function Documentation

void alog ( const char *  fmt,
  ... 
)
static void checkday ( void  )
static

Definition at line 69 of file log.c.

References close_log(), curday, open_log(), and remove_log().

Referenced by alog(), fatal(), fatal_perror(), fatal_sockerror(), and log_perror().

void close_log ( void  )

Definition at line 109 of file log.c.

References logfile.

Referenced by checkday().

void fatal ( const char *  fmt,
  ... 
)
void fatal_perror ( const char *  fmt,
  ... 
)
void fatal_sockerror ( const char *  fmt,
  ... 
)
static int get_logname ( char *  name,
int  count,
struct tm *  tm 
)
static

Definition at line 23 of file log.c.

References curday, log_filename, and snprintf().

Referenced by open_log(), and remove_log().

char* log_gettimestamp ( void  )

Definition at line 120 of file log.c.

References debug, and snprintf().

Referenced by alog(), fatal(), fatal_perror(), fatal_sockerror(), and log_perror().

void log_perror ( const char *  fmt,
  ... 
)

Definition at line 190 of file log.c.

References BUFSIZE, checkday(), log_gettimestamp(), logfile, nofork, strerror(), and vsnprintf().

int open_log ( void  )

Definition at line 89 of file log.c.

References get_logname(), and logfile.

Referenced by checkday().

static void remove_log ( void  )
static

Definition at line 44 of file log.c.

References get_logname(), and KeepLogs.

Referenced by checkday().

Variable Documentation

int curday = 0
static

Definition at line 19 of file log.c.

Referenced by checkday(), and get_logname().

FILE* logfile
static

Definition at line 17 of file log.c.

Referenced by alog(), close_log(), fatal(), fatal_perror(), fatal_sockerror(), log_perror(), and open_log().