Bug 7885 - Change filename of TransferLog suggested by packages to fit with logrotate
Summary: Change filename of TransferLog suggested by packages to fit with logrotate
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low normal
Assignee: Robin Sheat
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-03 10:32 UTC by Magnus Enger
Modified: 2013-12-05 19:59 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 7885 - Change filename of TransferLog suggested by packages to fit with logrotate (2.81 KB, patch)
2012-04-04 06:53 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 7885 - Change filename of TransferLog suggested by packages to fit with logrotate (2.83 KB, patch)
2012-04-04 10:21 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-04-03 10:32:34 UTC
debian/templates/apache-site.conf.in creates a per-site Apache conf file that contains this: 

#  TransferLog /var/log/koha/__KOHASITE__/opac-access_log

If this line is simply uncommented (by naive people like me), it will result in an access log like this:

/var/log/koha/mysite/opac-access_log

Now, the packages set up logrotate, but it only looks for this pattern: 

/var/log/koha/*/*.log

which results in the TransferLog not getting picked up by logrotate. Is there a specific reason for doing it this way, or would it be better if we changed the Apache conf file to this:

#  TransferLog /var/log/koha/__KOHASITE__/opac-access.log

---

Apache conf template: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=debian/templates/apache-site.conf.in

logrotate config: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=debian/koha-common.logrotate
Comment 1 Robin Sheat 2012-04-03 22:36:44 UTC
It's a weird apache default thing. I usually end up changing it manually whenever I enable the transfer log. So yes, I very much think it should be .log too.
Comment 2 Magnus Enger 2012-04-04 06:53:43 UTC Comment hidden (obsolete)
Comment 3 Robin Sheat 2012-04-04 10:21:32 UTC
Created attachment 8860 [details] [review]
Bug 7885 - Change filename of TransferLog suggested by packages to fit with logrotate

The apache accesslogs suggested by the default config files are called
*_log, which results in them not getting picked up by logrotate, which
looks for *.log. This patch changes the suggested filenames to *.log.

To test:
Not much to test here, just apply the patch and check that all
occurences of TransferLog and CustomLog are now on the form *.log

All the lines where these occur are commented out, so this will
not actually change any behaviour.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Comment 4 Robin Sheat 2012-04-04 10:23:24 UTC
Verified that it's totally harmless and ultimately a good thing to do.
Comment 5 Ian Walls 2012-04-04 10:52:08 UTC
Very simple change, _ to . in several cases.  If the Package Manager verifies it's safe, I'm inclined to believe.  Passed QA.
Comment 6 Paul Poulain 2012-04-04 12:57:22 UTC
in fact, I even think it's not an enhancement, but a bugfix, so updating severity
Comment 7 Jared Camins-Esakov 2012-05-24 00:48:21 UTC
This patch will be included in 3.6.5.