mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
The ASCII writer can now deal with /dev/* paths.
It will not longer try to add a ".log" extension.
This commit is contained in:
parent
4b7c5905f1
commit
26eab74ecc
5 changed files with 49 additions and 2 deletions
|
@ -17,7 +17,7 @@ LogWriterAscii::~LogWriterAscii()
|
|||
|
||||
bool LogWriterAscii::DoInit(string path, int num_fields, const LogField* const * fields)
|
||||
{
|
||||
fname = path + ".log";
|
||||
fname = IsSpecial(path) ? path : path + ".log";
|
||||
|
||||
if ( ! (file = fopen(fname.c_str(), "w")) )
|
||||
{
|
||||
|
@ -135,6 +135,10 @@ bool LogWriterAscii::DoWrite(int num_fields, const LogField* const * fields, Log
|
|||
|
||||
bool LogWriterAscii::DoRotate(string rotated_path, string postprocessor, double open, double close, bool terminating)
|
||||
{
|
||||
if ( ! IsSpecial(Path()) )
|
||||
// Don't rotate special files.
|
||||
return true;
|
||||
|
||||
fclose(file);
|
||||
|
||||
string nname = rotated_path + ".log";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue