------------------------------------------------------------ revno: 14008 revision-id: squid3@treenet.co.nz-20160323144637-gg2mclxukp6acgal parent: squid3@treenet.co.nz-20160323144124-bcowa87y1bxwrje8 fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4423 committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2016-03-24 03:46:37 +1300 message: Bug 4423: adding stdio: prefix to cache_log directive produces FATAL error ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160323144637-gg2mclxukp6acgal # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 9b669401ce3f3de757a93607793c54a4bba22778 # timestamp: 2016-03-23 14:51:05 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20160323144124-\ # bcowa87y1bxwrje8 # # Begin patch === modified file 'src/debug.cc' --- src/debug.cc 2016-01-01 00:14:27 +0000 +++ src/debug.cc 2016-03-23 14:46:37 +0000 @@ -222,7 +222,14 @@ if (debug_log && debug_log != stderr) fclose(debug_log); - debug_log = fopen(logfile, "a+"); + // Bug 4423: ignore the stdio: logging module name if present + const char *logfilename; + if (strncmp(logfile, "stdio:",6) == 0) + logfilename = logfile + 6; + else + logfilename = logfile; + + debug_log = fopen(logfilename, "a+"); if (!debug_log) { fprintf(stderr, "WARNING: Cannot write log file: %s\n", logfile);