mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Updating thread naming.
Also includes experimental code to adapt the thread name as shown by top, but it's untested.
This commit is contained in:
parent
cf6a346b86
commit
70fe7876a1
12 changed files with 81 additions and 14 deletions
|
@ -30,6 +30,9 @@ public:
|
|||
* frontend will internally instantiate a WriterBackend of the
|
||||
* corresponding type.
|
||||
*
|
||||
* name: A descriptive name for the backend wroter type (e.g., \c
|
||||
* Ascii).
|
||||
*
|
||||
* Frontends must only be instantiated by the main thread.
|
||||
*/
|
||||
WriterFrontend(bro_int_t type);
|
||||
|
@ -171,6 +174,14 @@ public:
|
|||
*/
|
||||
int NumFields() const { return num_fields; }
|
||||
|
||||
/**
|
||||
* Returns a descriptive name for the writer, including the type of
|
||||
* the backend and the path used.
|
||||
*
|
||||
* This method is safe to call from any thread.
|
||||
*/
|
||||
string Name() const;
|
||||
|
||||
/**
|
||||
* Returns the log fields as passed into the constructor.
|
||||
*/
|
||||
|
@ -184,6 +195,7 @@ protected:
|
|||
bool initialized; // True if initialized.
|
||||
bool buf; // True if buffering is enabled (default).
|
||||
|
||||
string ty_name; // Name of the backend type. Set by the manager.
|
||||
string path; // The log path.
|
||||
int num_fields; // The number of log fields.
|
||||
const Field* const* fields; // The log fields.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue