DiscoLog.Config (disco_log v1.0.3)
View SourceDiscoLog configuration
Configuration Schema
:otp_app(atom/0) - Required. Name of your application:token(String.t/0) - Required. Your Discord bot token:guild_id(String.t/0) - Required. Discord Server ID:category_id(String.t/0) - Required. Category (Channel) ID:occurrences_channel_id(String.t/0) - Required. Forum channel ID for error occurrences:info_channel_id(String.t/0) - Required. Text channel ID for info-level logs:error_channel_id(String.t/0) - Required. Text channel ID for logs higher than info-level logs:enable(boolean/0) - Automatically start DiscoLog? The default value istrue.:enable_logger(boolean/0) - Automatically attach logger handler? The default value istrue.:enable_discord_log(boolean/0) - Log requests to Discord API? The default value isfalse.:enable_presence(boolean/0) - Show DiscoLog bot status as Online? The default value isfalse.:instrument_oban(boolean/0) - Automatically instrument Oban? The default value istrue.:instrument_phoenix(boolean/0) - Automatically instrument Phoenix? The default value istrue.:instrument_tesla(boolean/0) - Automatically instrument Tesla? The default value istrue.:metadata(list ofatom/0) - List of Logger metadata keys to propagate with the message The default value is[].:excluded_domains(list ofatom/0) - Logs with domains from this list will be ignored The default value is[:cowboy, :bandit].:discord_client_module(atom/0) - Discord client to use The default value isDiscoLog.Discord.API.Client.:supervisor_name(atom/0) - Name of the supervisor process running DiscoLog The default value isDiscoLog.:presence_status(String.t/0) - A message to display as the bot's status when presence is enabled The default value is"🪩 Disco Logging".:enable_go_to_repo(boolean/0) - Enable go_to_repo feature? The default value isfalse.:go_to_repo_top_modules(list ofString.t/0) - List of top-level modules that are not part of the application spec but code belongs to the app The default value is[].:repo_url(String.t/0) - URL to the git repository viewer The default value is"".:git_sha(String.t/0) - The git SHA of the running app The default value is"".
Summary
Functions
Reads and validates config from global application configuration
Validates configuration against the schema
Types
@type config() :: map()
Functions
@spec read!() :: config()
Reads and validates config from global application configuration
@spec validate(options :: keyword() | map()) :: {:ok, config()} | {:error, NimbleOptions.ValidationError.t()}
Validates configuration against the schema
See validate/1