Added log rotation for prod config (#32)
This commit is contained in:
@@ -29,6 +29,8 @@ if config_env() == :prod do
|
||||
For example: /etc/pinchflat/pinchflat.db
|
||||
"""
|
||||
|
||||
log_path = System.get_env("LOG_PATH", "log/pinchflat.log")
|
||||
|
||||
config :pinchflat, yt_dlp_executable: System.find_executable("yt-dlp")
|
||||
|
||||
config :pinchflat, Pinchflat.Repo,
|
||||
@@ -74,6 +76,21 @@ if config_env() == :prod do
|
||||
],
|
||||
secret_key_base: secret_key_base
|
||||
|
||||
config :pinchflat, :logger, [
|
||||
{:handler, :file_log, :logger_std_h,
|
||||
%{
|
||||
config: %{
|
||||
type: :file,
|
||||
file: String.to_charlist(log_path),
|
||||
filesync_repeat_interval: 5000,
|
||||
file_check: 5000,
|
||||
max_no_files: 5,
|
||||
max_no_bytes: 10_000_000
|
||||
},
|
||||
formatter: Logger.Formatter.new()
|
||||
}}
|
||||
]
|
||||
|
||||
# ## SSL Support
|
||||
#
|
||||
# To get SSL working, you will need to add the `https` key
|
||||
|
||||
Reference in New Issue
Block a user