mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
29 lines
607 B
C++
29 lines
607 B
C++
//
|
|
// Log writer for tab-separated ASCII logs.
|
|
//
|
|
|
|
#ifndef LOGWRITERASCII_H
|
|
#define LOGWRITERASCII_H
|
|
|
|
#include "LogWriter.h"
|
|
|
|
class LogWriterAscii : public LogWriter {
|
|
public:
|
|
LogWriterAscii();
|
|
~LogWriterAscii();
|
|
|
|
static LogWriter* Instantiate() { return new LogWriterAscii; }
|
|
|
|
protected:
|
|
virtual bool DoInit(string path, int num_fields, LogField** fields);
|
|
virtual bool DoWrite(int num_fields, LogField** fields, LogVal** vals);
|
|
virtual void DoSetFlushing(bool enabled);
|
|
virtual bool DoRotate(string rotated_path);
|
|
virtual void DoFinish();
|
|
|
|
private:
|
|
FILE* file;
|
|
char* fname;
|
|
};
|
|
|
|
#endif
|