mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Merge remote branch 'origin/topic/robin/logging-internals'
Includes some additional cleanup.
This commit is contained in:
commit
13a492091f
119 changed files with 5266 additions and 183 deletions
10
src/Desc.h
10
src/Desc.h
|
@ -49,6 +49,9 @@ public:
|
|||
|
||||
void SetFlush(int arg_do_flush) { do_flush = arg_do_flush; }
|
||||
|
||||
// The string passed in must remain valid as long as this object lives.
|
||||
void SetEscape(const char* escape, int len);
|
||||
|
||||
void PushIndent();
|
||||
void PopIndent();
|
||||
void PopIndentNoNL();
|
||||
|
@ -97,6 +100,9 @@ public:
|
|||
Add("\n", 0);
|
||||
}
|
||||
|
||||
// Bypasses the escaping enabled via SetEscape().
|
||||
void AddRaw(const char* s, int len) { AddBytesRaw(s, len); }
|
||||
|
||||
// Returns the description as a string.
|
||||
const char* Description() const { return (const char*) base; }
|
||||
|
||||
|
@ -119,6 +125,7 @@ protected:
|
|||
void Indent();
|
||||
|
||||
void AddBytes(const void* bytes, unsigned int n);
|
||||
void AddBytesRaw(const void* bytes, unsigned int n);
|
||||
|
||||
// Make buffer big enough for n bytes beyond bufp.
|
||||
void Grow(unsigned int n);
|
||||
|
@ -132,6 +139,9 @@ protected:
|
|||
unsigned int offset; // where we are in the buffer
|
||||
unsigned int size; // size of buffer in bytes
|
||||
|
||||
int escape_len; // number of bytes in to escape sequence
|
||||
const char* escape; // bytes to escape on output
|
||||
|
||||
BroFile* f; // or the file we're using.
|
||||
|
||||
int indent_level;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue