diff --git a/app/providers/Logger/ServiceProvider.php b/app/providers/Logger/ServiceProvider.php index 6dc4fdf6a..0b74a72f2 100644 --- a/app/providers/Logger/ServiceProvider.php +++ b/app/providers/Logger/ServiceProvider.php @@ -84,7 +84,7 @@ function ($filename = null, $format = null) use ($logLevels) { $filename = rtrim($filename, '.') . '.log'; } - $logger = new File(app_path(sprintf("storage/logs/%s-%s", date('Ymd'), $filename))); + $logger = new File(app_path(sprintf("storage/logs/%s", $filename))); $logger->setFormatter(new Line($format, $date)); $logger->setLogLevel($level); diff --git a/storage/setup/logrotate.d/.editorconfig b/storage/setup/logrotate.d/.editorconfig new file mode 100644 index 000000000..d58fcafdd --- /dev/null +++ b/storage/setup/logrotate.d/.editorconfig @@ -0,0 +1,3 @@ +[phalcon-docs] +indent_style = tab +tab_width = 4 diff --git a/storage/setup/logrotate.d/phalcon-docs b/storage/setup/logrotate.d/phalcon-docs new file mode 100644 index 000000000..45e296e64 --- /dev/null +++ b/storage/setup/logrotate.d/phalcon-docs @@ -0,0 +1,20 @@ +# ---------------------------------------------------------------------- +# logrotate configuration example for Phalcon Documentation Website. +# +# Note: This is just example. Do not use it as is at production systems. +# ---------------------------------------------------------------------- + +/var/log/acme/*.log { + daily + rotate 7 + compress + delaycompress + missingok + create 660 nginx www-data + nodateext + sharedscripts + postrotate + /bin/kill -SIGUSR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true + /bin/kill -USR1 $(cat /var/run/nginx.pid 2>/dev/null) 2>/dev/null || : + endscript +} diff --git a/storage/setup/nginx.conf b/storage/setup/nginx.conf index 464ed412b..3d603143d 100644 --- a/storage/setup/nginx.conf +++ b/storage/setup/nginx.conf @@ -1,8 +1,8 @@ # ----------------------------------------------------------- # Nginx configuration for Phalcon Documentation Website -# ----------------------------------------------------------- -# Note: This file is used at Scrutinizer CI -# Use this configuration only if you know what you are doing +# +# Note: This file is used at Scrutinizer CI only. +# Do not use it as is at production systems. # ----------------------------------------------------------- server {