Last active
July 7, 2020 12:02
-
-
Save juanbono/f8d9515516bf088609fcc8be607ba079 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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