This section will describe how to configure error logging for Pyro.
debug option in your
config/app.php configuration file determines how much information about an error is actually displayed to the user. By default, this option is set to respect the value of the
APP_DEBUG environment variable, which is stored in your
For local development, you should set the
APP_DEBUG environment variable to
true. In your production environment, this value should always be
false. If the value is set to
true in production, you risk exposing sensitive configuration values to your application's end users.
Out of the box, PyroCMS supports writing log information exactly like Laravel. You can write to
daily files, the
syslog, and the
errorlog. To configure which storage mechanism Laravel uses, you should modify the
log option in your
config/app.php configuration file. For example, if you wish to use daily log files instead of a single file, you should set the
log value in your
app configuration file to
'log' => 'daily'
Maximum Daily Log Files
When using the
daily log mode, PyroCMS will only retain five days of log files by default. If you want to adjust the number of retained files, you may add a
log_max_files configuration value to your
app configuration file:
'log_max_files' => 30
Log Severity Levels
When using Monolog, log messages may have different levels of severity. By default, PyroCMS writes all log levels to storage. However, in your production environment, you may wish to configure the minimum severity that should be logged by adding the
log_level option to your
app.php configuration file.
Once this option has been configured, Laravel will log all levels greater than or equal to the specified severity. For example, a default
error will log error, critical, alert, and emergency messages:
'log_level' => env('APP_LOG_LEVEL', 'error'),
Monolog recognizes the following severity levels - from least severe to most severe: