[icecast] [PATCH] Fix TZ in access log

Dale Ghent daleg at elemental.org
Mon Jul 21 04:45:19 UTC 2003



Current (and even icecast 1.3) icecast strftime() format option is to 
specify "%z" for gathering the timezone value for use in the logs. This 
isn't POSIX. The true token for standard strftime() timezone value is 
%Z. This patch fixes that.

Without it, your log entries *may* look like this:

66.93.53.158 - - [21/Jul/2003:00:36:57 %z] "GET /full-on HTTP/1.1" 200 
31554203 "-" "iTunes/4.0 (Macintosh; N; PPC)" 1979

note the "%z" is passed as-is because Solaris strftime() at least does 
not recognise that token. It expects %Z, which is what it seems glibc 
expects as well (but it happens to support %z for a different 
non-standard parameter.)

<p>


Index: src/logging.h
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/logging.h,v
retrieving revision 1.8
diff -u -r1.8 logging.h
--- src/logging.h	16 Jul 2003 19:41:59 -0000	1.8
+++ src/logging.h	21 Jul 2003 04:38:47 -0000
@@ -72,7 +72,7 @@
 ** time of connection.
 */
 
-#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z"
+#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %Z"
 
 void logging_access(client_t *client);
 void restart_logging (void);





<p>/ek
http://elektronkind.org/
Psytrance: it's post-grad school for ravers.

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list