Changing the Component's Log Directory

This issue is intended for advanced users who want to change the directory for storing Zend component Log files.

By default, component logs are written to the directory specified in the directive zend.log_dir in the ZendGlobalDirectives.ini file located in <install_path>/etc/conf.d/ZendGlobalDirectives.ini .

If you change the path, the following components will write their logs to the new location:

  • monitor.log
  • monitor_node.log
  • monitor_zdo.log
  • page_cache.log

Linux

 

 

Instructions on how to complete a procedure

To Change the Log directory in Linux:

  1. Create the new logs directory with write permissions in order to be able to write the logs in the new directory.

  2. The new directory has to be owned by the Apache NOBODY user profile and belong to the file system group zend. To move the directory to the zend group run the following command as user root:

chown -r [Apache-user]:zend [new directory]

  1. Open <install_path>/etc/conf.d/ZendGglobalDdirectives.ini and change the value of zend.log_dir to the new log directory

  2. Run zendctl.sh stop and zendctl.sh start to apply the changes, this script is located in <install_path>/bin/

Now the log files for the Zend Page Cache and Zend Monitor components will be written to the new location. This means that some log files such as Apache and PHP, will still be written to the default directory (<install_path>/var/log)

Windows

 

 

Instructions on how to complete a procedure

To Change the Log directory in Windows:

  1. Create the new logs directory

  2. Open <install_path>\etc\php.ini and change the value of zend.log_dir to the new log directory

  3. To apply changes manually restart your Web server (Apache or IIS)

Now the log files for the Zend Page Cache and Zend Monitor components will be written to the new location. This means that some log files such as Apache and PHP, will still be written to the default directory (<install_path>\logs).

Note:

The new directory must have the same permissions as the original logs directory.

IBM i

 

 

Instructions on how to complete a procedure

To Change the Log directory in IBM i :

  1. Create the new logs directory with write permissions in order to be able to write the logs in the new directory.
    The new directory has to be owned by user profile QTMHHTTP

  2. Open /usr/local/zendphp7/etc/conf.d/global_directives.ini/ and change the value of zend.log_dir to the new log directory

  3. Run Stop and Start Apache from the Setup Menu to apply the changes.

Now the log files for the Zend Page Cache and Zend Monitor components will be written to the new location.

This means that some log files such as Apache and PHP, will still be written to the default directory (/usr/local/zendphp7/etc/var/log).