Skip to content

Instantly share code, notes, and snippets.

@juanbono
Last active July 7, 2020 12:02
Show Gist options
  • Save juanbono/f8d9515516bf088609fcc8be607ba079 to your computer and use it in GitHub Desktop.
Save juanbono/f8d9515516bf088609fcc8be607ba079 to your computer and use it in GitHub Desktop.
defmodule Logging21.Application do
@moduledoc false
use Application
def start(_type, _args) do
:logger.add_handlers(:logging_21)
opts = [strategy: :one_for_one, name: Logging21.Supervisor]
Supervisor.start_link([], opts)
end
end
import Config
config :logger,
handle_otp_reports: false,
handle_sasl_reports: false
config :logging_21, :logger, [
{
:handler,
:my_hacky_handler,
:logger_disk_log_h,
%{
config: %{
:file => './my_disk_log',
:type => :wrap,
:max_no_files => 4,
:max_no_bytes => 100,
:filesync_repeat_interval => 1000
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment