policy/frameworks/cluster/controller/log.zeek

ClusterController::Log

This module implements straightforward logging abilities for cluster 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 logging does not involve any logger nodes.

Namespace

ClusterController::Log

Imports

policy/frameworks/cluster/controller/config.zeek

Summary

Types

ClusterController::Log::Info: record &log

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

ClusterController::Log::Level: enum

The controller/agent log supports four different log levels.

Redefinitions

Log::ID: enum

The cluster logging stream identifier.

Hooks

ClusterController::Log::log_policy: Log::PolicyHook

A default logging policy hook for the stream.

Functions

ClusterController::Log::debug: function

A debug-level log message writer.

ClusterController::Log::error: function

An error-level log message writer.

ClusterController::Log::info: function

An info-level log message writer.

ClusterController::Log::warning: function

A warning-level log message writer.

Detailed Interface

Types

ClusterController::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 ClusterController::Types::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.

ClusterController::Log::Level
Type

enum

ClusterController::Log::DEBUG
ClusterController::Log::INFO
ClusterController::Log::WARNING
ClusterController::Log::ERROR

The controller/agent log supports four different log levels.

Hooks

ClusterController::Log::log_policy
Type

Log::PolicyHook

A default logging policy hook for the stream.

Functions

ClusterController::Log::debug
Type

function (message: string) : void

A debug-level log message writer.

Message

the message to log.

ClusterController::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.)

Message

the message to log.

ClusterController::Log::info
Type

function (message: string) : void

An info-level log message writer.

Message

the message to log.

ClusterController::Log::warning
Type

function (message: string) : void

A warning-level log message writer.

Message

the message to log.