add logging in dev
This commit is contained in:
parent
70886e169a
commit
9eea1725e2
3 changed files with 18 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -34,6 +34,9 @@ chiya-*.tar
|
|||
!/priv/static/site.webmanifest
|
||||
!/priv/static/browserconfig.xml
|
||||
|
||||
/log/*
|
||||
!/log/.gitkeep
|
||||
|
||||
# Ignore digested assets cache.
|
||||
/priv/static/cache_manifest.json
|
||||
|
||||
|
|
|
@ -77,3 +77,18 @@ config :phoenix, :plug_init_mode, :runtime
|
|||
|
||||
# Disable swoosh api client as it is only required for production adapters.
|
||||
config :swoosh, :api_client, false
|
||||
|
||||
log_directory = Path.join(File.cwd!(), "log")
|
||||
|
||||
config :logger,
|
||||
backends: [{LoggerFileBackend, :info_log}, {LoggerFileBackend, :error_log}]
|
||||
|
||||
config :logger, :info_log,
|
||||
path: Path.join(log_directory, "chiya-info.log"),
|
||||
level: :info,
|
||||
format: "[$date] [$time] [$level] $message\n"
|
||||
|
||||
config :logger, :error_log,
|
||||
path: Path.join(log_directory, "chiya-error.log"),
|
||||
level: :error,
|
||||
format: "[$date] [$time] [$level] $message\n"
|
0
log/.gitkeep
Normal file
0
log/.gitkeep
Normal file
Loading…
Reference in a new issue