From: hno <> Date: Wed, 22 Aug 2007 05:50:12 +0000 (+0000) Subject: access_log syslog facility and priority specification using the familiar facility... X-Git-Tag: SQUID_3_0_PRE7~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca42e6e47db7f4258e864322232d6d231595326;p=thirdparty%2Fsquid.git access_log syslog facility and priority specification using the familiar facility.priority format This update finalizes the access_log syslog syntax changes, ending up with the same syntax as used in syslog.conf. facility.priority The original 'C' form also understood. LOG_USER4|LOG_INFO --- diff --git a/src/cf.data.pre b/src/cf.data.pre index 109c753868..8568fc3400 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.454 2007/08/21 23:19:36 hno Exp $ +# $Id: cf.data.pre,v 1.455 2007/08/21 23:50:12 hno Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -1159,7 +1159,7 @@ DOC_START To log the request via syslog specify a filepath of "syslog": - access_log syslog[:facility|priority] [format [acl1 [acl2 ....]]] + access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]] where facility could be any of: authpriv, daemon, local9 .. local7 or user. diff --git a/src/logfile.cc b/src/logfile.cc index 6024265905..25b489a7d3 100644 --- a/src/logfile.cc +++ b/src/logfile.cc @@ -1,5 +1,5 @@ /* - * $Id: logfile.cc,v 1.23 2007/08/21 16:41:06 hno Exp $ + * $Id: logfile.cc,v 1.24 2007/08/21 23:50:12 hno Exp $ * * DEBUG: section 50 Log file handling * AUTHOR: Duane Wessels @@ -102,7 +102,10 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) if (path[6] != '\0') { path += 7; - char* delim = strchr(path, '|'); + char* delim = strchr(path, '.'); + + if (!delim) + delim = strchr(path, '|'); if (delim != NULL) *delim = '\0';