problem with rotatelogs time of day formatting
2011-10-01 03:20:12 GMT
I'm trying to set up piped access and error logs, with "rotatelogs", as I'm porting the configuration from Solaris box to a small cluster of Linux VMs running RHEL 5. We're trying to use file name patterns like: error_log_chnuinfow3.%Y-%m-%d-%H_%M_%S.txt The date substitutions are working, but the time of day characters come out as zeros. An example, and some system information, are quoted below. I originally was trying to use rotatelogs from the Red Hat httpd RPMs. But since they are a version of httpd 2.2.3 with back-ported patches, I then tried building the newest httpd 2.2.21 from source, off to one side, with static support binaries. That's the source of /usr/local/sbin/rotatelogs below. But both versions seem to have the same symptom. I wrote a C program to test the system strftime, and that seemed to work as expected, but I suppose the APR library date/time library is what is being used, making that somewhat moot. (I'm also aware of logrotate, and the legacy server just stops and starts the server in a nightly job that also rotates the logs in a shell script. Others wanted to do use piped log rotation, I'm trying to make it work.) Any ideas?(Continue reading)
RSS Feed