Customizing mobile proxy log files
Optional: Customize the log ID in the system logs and redirect logs to a custom log file.
By default the system logs are located at /var/log/messages. The log ID that is noted in the system logs for the Bravura One mobile proxy server log messages is by default noted as hitachi-id
.
The log messages may be redirected to a custom log file. In this case, log messages generated by the Bravura One mobile proxy server will be written both to the system log file as well as a custom log file. The log ID that is noted in the log messages may also be customized to a different value. This would be reflected in the system logs as well as a custom log file, if configured.
In this example, we will use /usr/local/psunix/mobproxy/logid-mobproxy
as the mobile proxy binary name and will be redirecting the Bravura One mobile proxy server log messages to /var/log/mobproxy.log
.
To customize the log ID:
Ensure that the mobile proxy binary begins with "logid-".
For example if it is named as
/usr/local/psunix/mobproxy/mobproxy,
then rename it it to/usr/local/psunix/mobproxy/logid-mobproxy
.Ensure that the Apache rewrite rule reflects this change for the mobile proxy binary name.
To customize the log file:
Locate the syslog configuration file. By default this is at
/etc/rsyslog.conf
.Add a line such as the following to the system log configuration file (note that the program name does not include " logid- "):
if $programname == 'mobproxy' then /var/log/mobproxy.log
Restart the syslog and apache services:
CentOS:
service rsyslog restart service httpd restart
Debian:
service rsyslog restart service apache2 restart
The Bravura One mobile proxy server logs will now be /var/log/mobproxy.log
in addition to the server’s system log file and log entries will contain a log ID of " mobproxy ".