Skip to content

Encoders

Classes

EncoderCompress

EncoderCompress(*args)

Encoder

Compress each msg with zlib compress (requires zlib).


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


EncoderFormat

EncoderFormat(template: str)

Encoder

Apply the specified format to each log msg.


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


vars

.vars()

Variables available to use.


MESSAGE
.MESSAGE = '${msg}'

Raw log message (newline stripped).


MESSAGE_NEWLINE
.MESSAGE_NEWLINE = '${msgnl}'

Raw log message (with newline).


TIME
.TIME = '${unix}'

Current unix time.


TIME_FORMAT
.TIME_FORMAT = TimeFormatter

Current time in user-defined format.


TIME_MS
.TIME_MS = '${millis}'

Current unix time in milliseconds.


TIME_US
.TIME_US = '${micros}'

Current unix time in microseconds.


EncoderGzip

EncoderGzip(*args)

Encoder

Compress each msg with gzip (requires zlib).


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


EncoderJson

EncoderJson(template: str)

EncoderFormat

Apply the specified format to each log msg with each variable json escaped.


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


vars

.vars()

Variables available to use.


MESSAGE
.MESSAGE = '${msg}'

Raw log message (newline stripped).


MESSAGE_NEWLINE
.MESSAGE_NEWLINE = '${msgnl}'

Raw log message (with newline).


TIME
.TIME = '${unix}'

Current unix time.


TIME_FORMAT
.TIME_FORMAT = TimeFormatter

Current time in user-defined format.


TIME_MS
.TIME_MS = '${millis}'

Current unix time in milliseconds.


TIME_US
.TIME_US = '${micros}'

Current unix time in microseconds.


EncoderNewline

EncoderNewline(*args)

Encoder

Add a newline char to each log msg.


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


EncoderPrefix

EncoderPrefix(value: str)

Encoder

Add a raw prefix to each log msg.


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


EncoderSuffix

EncoderSuffix(value: str)

EncoderPrefix

Add a raw suffix to each log msg


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


TimeFormatter

TimeFormatter(fmt: str)

TemplatedValue

Allows user-defined time value formatting.


alias

.alias: str = ''

Alias to address this value.


args_joiner

.args_joiner: str = ' '

Symbol to join arguments with.


name

.name: str = ''

Name to represent the group.


name_separator

.name_separator: str = ':'

Separator to add after name portion.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.