Merge pull request 'devel' (#104) from devel into main

Reviewed-on: #104
This commit is contained in:
inhji 2023-06-09 20:57:52 +02:00
commit 4c777a90bb
4 changed files with 19 additions and 1 deletions

3
.gitignore vendored
View file

@ -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

View file

@ -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
View file

View file

@ -19,7 +19,7 @@ defmodule Chiya.MixProject do
def application do
[
mod: {Chiya.Application, []},
extra_applications: [:logger, :runtime_tools]
extra_applications: [:logger, :logger_file_backend, :runtime_tools]
]
end