diff --git a/docs/installation/best-practices.md b/docs/installation/best-practices.md index 8441543fe..6273798a2 100755 --- a/docs/installation/best-practices.md +++ b/docs/installation/best-practices.md @@ -15,7 +15,7 @@ ExpressionEngine's system files and directories are typically safe from direct HTTP access on a properly configured server. -However, for increased security we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named public_html or referred to as simply "webroot") and that admin.php be renamed as well. This document describes the renaming process. +However, for increased security we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named `public_html` or referred to as simply "webroot") and that `admin.php` be renamed as well. This document describes the renaming process. ## Renaming the System Directory diff --git a/docs/toc_sections/_best_practices_toc.yml b/docs/toc_sections/_best_practices_toc.yml index 8247b5b99..149b2f0b6 100644 --- a/docs/toc_sections/_best_practices_toc.yml +++ b/docs/toc_sections/_best_practices_toc.yml @@ -42,4 +42,6 @@ - name: Simple Commerce Module href: troubleshooting/simple-commerce-module.md - name: Error Messages - href: troubleshooting/error-messages.md \ No newline at end of file + href: troubleshooting/error-messages.md + - name: Error Logging + href: troubleshooting/error-logging.md \ No newline at end of file diff --git a/docs/troubleshooting/error-logging.md b/docs/troubleshooting/error-logging.md new file mode 100644 index 000000000..4039a0e5e --- /dev/null +++ b/docs/troubleshooting/error-logging.md @@ -0,0 +1,33 @@ + + +# Error Logging + +[TOC] + +### Error Logging + +There could be situations when there is PHP error that is invisible to the user, but is preventing the code logic to be executed properly. + +To help finding those out, error logging could be enabled in ExpressionEngine. + +To enable error logging, you need to do the following: + +1. Create `logs` folder inside your `system/user` folder and make sure it's writable +2. Open `config.php` file and add following config overrides + - [`log_threshold`](general/system-configuration-overrides.md#log_threshold) (required) + - [`log_date_format`](general/system-configuration-overrides.md#log_date_format) (optional) + +Example: +``` + $config['log_date_format'] = 'Y-m-d H:i:s'; + $config['log_threshold'] = '1'; +``` + +Now, when a code issue is encountered within ExpressionEngine, error or warning message is added to the file for corresponding date inside `system/user/logs` folder. \ No newline at end of file