NervesHubLink.Extensions.Logging.Config (nerves_hub_link v2.14.0)

Copy Markdown View Source

How the Logging extension is configured.

config :nerves_hub_link,
  logging: [
    level: :info,
    max_lines: 1000,
    interval_seconds: 60
  ]

Shared by both versions of the extension: level is read by NervesHubLink.Extensions.Logging as well. The rest only means anything to NervesHubLink.Extensions.Logging.Batched, which is the version that collects and sends in bulk.

Turning logging on is naming the module in extension_modules, not a key here.

Summary

Functions

How long to buffer before sending, in milliseconds.

The lowest level to collect.

How many lines to hold before dropping the oldest.

Functions

interval()

@spec interval() :: pos_integer()

How long to buffer before sending, in milliseconds.

Never less than 60 seconds, whatever is configured.

level()

@spec level() :: Logger.level()

The lowest level to collect.

max_lines()

@spec max_lines() :: pos_integer()

How many lines to hold before dropping the oldest.