Skip to content

Commit

Permalink
Merge branch '4.12' into 4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Apr 23, 2023
2 parents 3090b0d + 5a81f0d commit dc0d85b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion en/00_Getting_Started/03_Environment_Management.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Silverstripe core environment variables are listed here, though you're free to d
| `SS_USE_BASIC_AUTH`| Baseline protection for requests handled by Silverstripe. Usually requires additional security measures for comprehensive protection. See [Environment Types](/developer_guides/debugging/environment_types) for caveats.|
| `SS_SEND_ALL_EMAILS_TO`| If you define this constant, all emails will be redirected to this address.|
| `SS_SEND_ALL_EMAILS_FROM`| If you define this constant, all emails will be sent from this address.|
| `SS_ERROR_LOG` | Relative path to the log file. |
| `SS_ERROR_LOG` | Relative path to the log file (see [Logging and Error Handling](/developer_guides/debugging/error_handling/#logging-to-a-file)). |
| `SS_PROTECTED_ASSETS_PATH` | Path to secured assets - defaults to ASSETS_PATH/.protected |
| `SS_DATABASE_MEMORY` | Used for SQLite3 DBs |
| `SS_TRUSTED_PROXY_IPS` | IP address or CIDR range to trust proxy headers from. If left blank no proxy headers are trusted. Can be set to 'none' (trust none) or '*' (trust all) |
Expand Down
15 changes: 11 additions & 4 deletions en/02_Developer_Guides/07_Debugging/01_Error_Handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,19 @@ SilverStripe\Core\Injector\Injector:
LogFileHandler:
class: Monolog\Handler\StreamHandler
constructor:
- "../silverstripe.log"
- "/var/www/silverstripe.log"
- "info"
```

The log file will be relative to the main index.php file path (default: inside public/), so "../silverstripe.log" will
create a file in your project root.
[warning]
The log file path must be an absolute file path, as relative paths may behave differently between CLI and HTTP requests. If you want to use a _relative_ path, you can use the `SS_ERROR_LOG` environment variable to declare a file path that is relative to your project root:

```sh
SS_ERROR_LOG="./silverstripe.log"
```

You don't need any of the yaml configuration above if you are using the `SS_ERROR_LOG` environment variable - but you can use a combination of the environment variable and yaml configuration if you want to configure multiple error log files.
[/warning]

[notice]
You will need to make sure the user running the php process has write access to the log file, wherever you choose to put it.
Expand Down Expand Up @@ -235,7 +242,7 @@ SilverStripe\Core\Injector\Injector:
LogFileHandler:
class: Monolog\Handler\StreamHandler
constructor:
- "../silverstripe.log"
- "/var/www/silverstripe.log"
- "notice"
properties:
Formatter: '%$Monolog\Formatter\HtmlFormatter'
Expand Down

0 comments on commit dc0d85b

Please sign in to comment.