Encoders

class uwsgiconf.options.logging_encoders.Encoder(*args)
class uwsgiconf.options.logging_encoders.EncoderPrefix(value)

Add a raw prefix to each log msg.

Parameters:value (str) – Value to be used as affix
class uwsgiconf.options.logging_encoders.EncoderSuffix(value)

Add a raw suffix to each log msg

Parameters:value (str) – Value to be used as affix
class uwsgiconf.options.logging_encoders.EncoderNewline(*args)

Add a newline char to each log msg.

class uwsgiconf.options.logging_encoders.EncoderGzip(*args)

Compress each msg with gzip (requires zlib).

class uwsgiconf.options.logging_encoders.EncoderCompress(*args)

Compress each msg with zlib compress (requires zlib).

class uwsgiconf.options.logging_encoders.TimeFormatter(fmt: str)

Allows user-defined time value formatting.

Parameters:fmt

Time value format Format string (as for strftime)

Aliases:
  • iso - ISO 8601: %Y-%m-%dT%H:%M:%S%z
    2020-11-29T04:44:08+0000
class uwsgiconf.options.logging_encoders.EncoderFormat(template)

Apply the specified format to each log msg.

Parameters:template (str) – Template string. Available variables are listed in FormatEncoder.Vars.
class vars

Variables available to use.

MESSAGE = '${msg}'

Raw log message (newline stripped).

MESSAGE_NEWLINE = '${msgnl}'

Raw log message (with newline).

TIME = '${unix}'

Current unix time.

TIME_US = '${micros}'

Current unix time in microseconds.

TIME_MS = '${millis}'

Current unix time in milliseconds.

TIME_FORMAT

Current time in user-defined format.

alias of TimeFormatter

class uwsgiconf.options.logging_encoders.EncoderJson(template)

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

Parameters:template (str) – Template string. Available variables are listed in FormatEncoder.Vars.