Skip to Content
[CAIDA - Center for Applied Internet Data Analysis logo]
The Center for Applied Internet Data Analysis
corsaro_log.h
Go to the documentation of this file.
1 /*
2  * corsaro
3  *
4  * Alistair King, CAIDA, UC San Diego
5  * corsaro-info@caida.org
6  *
7  * Copyright (C) 2012 The Regents of the University of California.
8  *
9  * This file is part of corsaro.
10  *
11  * corsaro is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * corsaro is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with corsaro. If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 #ifndef __CORSARO_LOG_H
27 #define __CORSARO_LOG_H
28 
29 #include "config.h"
30 
31 #include <stdarg.h>
32 
33 #include "corsaro_int.h"
34 #include "corsaro_file.h"
35 
53 void corsaro_log_va(const char *func, corsaro_t *corsaro,
54  const char *format, va_list args);
55 
65 void corsaro_log(const char *func, corsaro_t *corsaro, const char *format, ...);
66 
76 void corsaro_log_in(const char *func, corsaro_in_t *corsaro, const char *format, ...);
77 
87 void corsaro_log_file(const char *func, corsaro_file_t *logfile,
88  const char *format, ...);
89 
96 
103 
109 
115 
116 #endif /* __CORSARO_LOG_H */
An opaque structure defining an corsaro output file.
Definition: corsaro_file.h:60
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.
Definition: corsaro_log.c:106
void corsaro_log_close(corsaro_t *corsaro)
Close the log file for an corsaro output object.
Definition: corsaro_log.c:163
Header file dealing with the low-level file IO.
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.
Definition: corsaro_log.c:121
int corsaro_log_init(corsaro_t *corsaro)
Initialize the logging sub-system for an corsaro output object.
Definition: corsaro_log.c:141
void corsaro_log_in_close(corsaro_in_t *corsaro)
Close the log file for an corsaro input object.
Definition: corsaro_log.c:172
void corsaro_log_file(const char *func, corsaro_file_t *logfile, const char *format,...)
Write a formatted string to a generic log file.
Definition: corsaro_log.c:132
Corsaro input state.
Definition: corsaro_int.h:323
Corsaro output state.
Definition: corsaro_int.h:230
int corsaro_log_in_init(corsaro_in_t *corsaro)
Initialize the logging sub-system for an corsaro input object.
Definition: corsaro_log.c:156
void corsaro_log(const char *func, corsaro_t *corsaro, const char *format,...)
Write a formatted string to the logfile associated with an corsaro object.
Definition: corsaro_log.c:113
Header file dealing with the internal corsaro functions.