File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ class Log extends \Zend\Log\Logger{
1313 */
1414 public static $ logFilePath = '/usr/local/zend/var/log/app_deployment.log ' ;
1515
16+ /**
17+ * Default path for logging on IBM i
18+ *
19+ * @var string
20+ */
21+ public static $ logFilePathI5 = '/usr/local/zendsvr6/var/log/app_deployment.log ' ;
22+
1623 /**
1724 * List of files which are excluded/not read in fullVerbose mode
1825 * @var array
@@ -41,6 +48,19 @@ class Log extends \Zend\Log\Logger{
4148 */
4249 private $ guiOutputEnabled = false ;
4350
51+ /**
52+ * retrieves path of default log file path depending on OS
53+ *
54+ * @return string
55+ */
56+ public static function getDefaultLogFilePath () {
57+ if (strpos (php_uname (), "OS400 " ) !== false ) {
58+ return self ::$ logFilePathI5 ;
59+ }
60+
61+ return self ::$ logFilePath ;
62+ }
63+
4464 /**
4565 * retrieves path of app specific log file
4666 *
@@ -53,7 +73,7 @@ public static function getLogFilePath($appName, $appVersion) {
5373 $ appName = $ filter ->filter ($ appName );
5474 $ replace = 'app_ ' . strtolower ($ appName ) . '_ ' . strtolower ($ appVersion ) . '_ ' ;
5575
56- return str_replace ('app_ ' , $ replace , self ::$ logFilePath );
76+ return str_replace ('app_ ' , $ replace , self ::getDefaultLogFilePath () );
5777 }
5878
5979 /**
You can’t perform that action at this time.
0 commit comments