policy/frameworks/management/log.zeek

Management::Log

This module implements logging abilities for controller and agent. It uses Zeek’s logging framework and works only for nodes managed by the supervisor. In this setting Zeek’s logging framework operates locally, i.e., this does not involve logger nodes.

Namespace

Management::Log

Imports

policy/frameworks/management/config.zeek

Summary

Types

Management::Log::Info: record &log

The record type containing the column fields of the agent/controller log.

Management::Log::Level: enum

The controller/agent log supports four different log levels.

Redefinitions

Log::ID: enum

The cluster logging stream identifier.

Hooks

Management::Log::log_policy: Log::PolicyHook

A default logging policy hook for the stream.

Functions

Management::Log::debug: function

A debug-level log message writer.

Management::Log::error: function

An error-level log message writer.

Management::Log::info: function

An info-level log message writer.

Management::Log::warning: function

A warning-level log message writer.

Detailed Interface

Types

Management::Log::Info
Type

record

ts: time &log

The time at which a cluster message was generated.

node: string &log

The name of the node that is creating the log record.

level: string &log

Log level of this message, converted from the above Level enum

role: string &log

The role of the node, translated from Management::Role.

message: string &log

A message indicating information about cluster controller operation.

Attributes

&log

The record type containing the column fields of the agent/controller log.

Management::Log::Level
Type

enum

Management::Log::DEBUG
Management::Log::INFO
Management::Log::WARNING
Management::Log::ERROR

The controller/agent log supports four different log levels.

Hooks

Management::Log::log_policy
Type

Log::PolicyHook

A default logging policy hook for the stream.

Functions

Management::Log::debug
Type

function (message: string) : void

A debug-level log message writer.

Parameters

message – the message to log.

Management::Log::error
Type

function (message: string) : void

An error-level log message writer. (This only logs a message, it does not terminate Zeek or have other runtime effects.)

Parameters

message – the message to log.

Management::Log::info
Type

function (message: string) : void

An info-level log message writer.

Parameters

message – the message to log.

Management::Log::warning
Type

function (message: string) : void

A warning-level log message writer.

Parameters

message – the message to log.