Packages
API for the Bunyan distributed and pluggable logging system (error, warn, info, and debug functions)
Current section
Files
Jump to
Current section
Files
lib/api/state.ex
defmodule Bunyan.Source.Api.State do
alias Bunyan.Shared.Level
defstruct(
collector: nil,
runtime_log_level: Level.of(:debug)
)
@valid_options [ :runtime_log_level ]
@spec from(keyword()) :: %__MODULE__{} | none()
def from(options) do
import Bunyan.Shared.Options
validate_legal_options(options, @valid_options, Bunyan.Source.Api)
%__MODULE__{}
|> maybe_add_level(options, :runtime_log_level)
end
end