]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/log/File.h
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_SRC_LOG_FILE_H
10 #define SQUID_SRC_LOG_FILE_H
15 #include <sys/param.h>
18 class logfile_buffer_t
30 typedef void LOGLINESTART(Logfile
*);
31 typedef void LOGWRITE(Logfile
*, const char *, size_t len
);
32 typedef void LOGLINEEND(Logfile
*);
33 typedef void LOGFLUSH(Logfile
*);
34 typedef void LOGROTATE(Logfile
*);
35 typedef void LOGCLOSE(Logfile
*);
41 char path
[MAXPATHLEN
];
47 int64_t sequence_number
; ///< Unique sequence number per log line.
52 LOGLINESTART
*f_linestart
;
53 LOGWRITE
*f_linewrite
;
54 LOGLINEEND
*f_lineend
;
61 Logfile
*logfileOpen(const char *path
, size_t bufsz
, int);
62 void logfileClose(Logfile
* lf
);
63 void logfileRotate(Logfile
* lf
);
64 void logfileWrite(Logfile
* lf
, char *buf
, size_t len
);
65 void logfileFlush(Logfile
* lf
);
66 void logfilePrintf(Logfile
* lf
, const char *fmt
,...) PRINTF_FORMAT_ARG2
;
67 void logfileLineStart(Logfile
* lf
);
68 void logfileLineEnd(Logfile
* lf
);
70 #endif /* SQUID_SRC_LOG_FILE_H */