File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 5656 /*
5757 * The following settings are *filesystem paths* which define where
5858 * SimpleSAMLphp can find or write the following things:
59- * - 'loggingdir': Where to write logs.
59+ * - 'loggingdir': Where to write logs. MUST be set to NULL when using a logging
60+ * handler other than `file`.
6061 * - 'datadir': Storage of general data.
6162 * - 'tempdir': Saving temporary files. SimpleSAMLphp will attempt to create
6263 * this directory if it doesn't exist.
323324 */
324325
325326
326-
327327 /**************************
328328 | LOGGING AND STATISTICS |
329329 **************************/
359359 *
360360 * - %level: the log level (name or number depending on the handler used).
361361 *
362- * - %stat: if the log entry is intended for statistical purposes, it will print the string 'STAT ' (bear in mind
362+ - * - %stat: if the log entry is intended for statistical purposes, it will print the string 'STAT ' (bear in mind
363363 * the trailing space).
364364 *
365365 * - %trackid: the track ID, an identifier that allows you to track a single session.
Original file line number Diff line number Diff line change 1616use Symfony \Component \HttpKernel \Kernel as BaseKernel ;
1717use Symfony \Component \Routing \Loader \Configurator \RoutingConfigurator ;
1818
19+ use function getenv ;
20+ use function is_dir ;
21+ use function sys_get_temp_dir ;
22+
1923/**
2024 * A class to create the container and handle a given request.
2125 */
@@ -67,12 +71,7 @@ public function getLogDir(): string
6771 {
6872 $ configuration = Configuration::getInstance ();
6973 $ handler = $ configuration ->getString ('logging.handler ' );
70-
71- if ($ handler === 'file ' ) {
72- $ loggingPath = $ configuration ->getString ('loggingdir ' );
73- } else {
74- $ loggingPath = '/dev/null ' ;
75- }
74+ $ loggingPath = $ configuration ->getString ('loggingdir ' , sys_get_temp_dir ());
7675
7776 $ sysUtils = new System ();
7877 if ($ sysUtils ->isAbsolutePath ($ loggingPath )) {
You can’t perform that action at this time.
0 commit comments