Skip to Content
[CAIDA - Cooperative Association for Internet Data Analysis logo]
The Cooperative Association for Internet Data Analysis
corsaro_log.h File Reference

Header file dealing with the corsaro logging sub-system. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void corsaro_log_va (const char *func, corsaro_t *corsaro, const char *format, va_list args)
 Write a formatted string to the logfile associated with an corsaro object.
void corsaro_log (const char *func, corsaro_t *corsaro, const char *format,...)
 Write a formatted string to the logfile associated with an corsaro object.
void corsaro_log_in (const char *func, corsaro_in_t *corsaro, const char *format,...)
 Write a formatted string to the logfile associated with an corsaro input object.
void corsaro_log_file (const char *func, corsaro_file_t *logfile, const char *format,...)
 Write a formatted string to a generic log file.
int corsaro_log_init (corsaro_t *corsaro)
 Initialize the logging sub-system for an corsaro output object.
int corsaro_log_in_init (corsaro_in_t *corsaro)
 Initialize the logging sub-system for an corsaro input object.
void corsaro_log_close (corsaro_t *corsaro)
 Close the log file for an corsaro output object.
void corsaro_log_in_close (corsaro_in_t *corsaro)
 Close the log file for an corsaro input object.

Detailed Description

Header file dealing with the corsaro logging sub-system.

Author:
Alistair King

Definition in file corsaro_log.h.


Function Documentation

void corsaro_log ( const char *  func,
corsaro_t corsaro,
const char *  format,
  ... 
)

Write a formatted string to the logfile associated with an corsaro object.

Parameters:
funcThe name of the calling function (func)
corsaroThe corsaro output object to log for
formatThe printf style formatting string
...Variable list of arguments to the format string

This function takes the same style of arguments that printf(3) does.

Definition at line 113 of file corsaro_log.c.

void corsaro_log_close ( corsaro_t corsaro)

Close the log file for an corsaro output object.

Parameters:
corsaroThe corsaro output object to close logging for

Definition at line 160 of file corsaro_log.c.

References corsaro::logfile.

void corsaro_log_file ( const char *  func,
corsaro_file_t logfile,
const char *  format,
  ... 
)

Write a formatted string to a generic log file.

Parameters:
funcThe name of the calling function (func)
fileThe file to log to (STDERR if NULL is passed)
formatThe printf style formatting string
...Variable list of arguments to the format string

This function takes the same style of arguments that printf(3) does.

Definition at line 131 of file corsaro_log.c.

void corsaro_log_in ( const char *  func,
corsaro_in_t corsaro,
const char *  format,
  ... 
)

Write a formatted string to the logfile associated with an corsaro input object.

Parameters:
funcThe name of the calling function (func)
corsaroThe corsaro input object to log for
formatThe printf style formatting string
...Variable list of arguments to the format string

This function takes the same style of arguments that printf(3) does.

Definition at line 121 of file corsaro_log.c.

void corsaro_log_in_close ( corsaro_in_t corsaro)

Close the log file for an corsaro input object.

Parameters:
corsaroThe corsaro output object to close logging for

Definition at line 169 of file corsaro_log.c.

int corsaro_log_in_init ( corsaro_in_t corsaro)

Initialize the logging sub-system for an corsaro input object.

Parameters:
corsaroThe corsaro object to associate the logger with
Returns:
0 if successful, -1 if an error occurs

Definition at line 153 of file corsaro_log.c.

int corsaro_log_init ( corsaro_t corsaro)

Initialize the logging sub-system for an corsaro output object.

Parameters:
corsaroThe corsaro object to associate the logger with
Returns:
0 if successful, -1 if an error occurs

Definition at line 140 of file corsaro_log.c.

References CORSARO_FILE_COMPRESS_NONE, CORSARO_FILE_MODE_ASCII, CORSARO_IO_LOG_NAME, and corsaro::logfile.

void corsaro_log_va ( const char *  func,
corsaro_t corsaro,
const char *  format,
va_list  args 
)

Write a formatted string to the logfile associated with an corsaro object.

Parameters:
funcThe name of the calling function (func)
corsaroThe corsaro output object to log for
formatThe printf style formatting string
argsVariable list of arguments to the format string

This function takes the same style of arguments that printf(3) does.

Definition at line 106 of file corsaro_log.c.

References corsaro::logfile.