[TYPO3-core] RFC: Resubmission of feature #1585: Logfile by Request URI + configuration of Empty Referer handling + logline hook
Michael Stucki
michael at typo3.org
Thu Jan 31 17:02:27 CET 2008
Hello Ralf,
> (1) Introduce the options [requesturi] and [requesturi] to
> config.stat_apache_pagenames
I suppose there was a typo above. Anyway, can I ask you to keep the
underscores in the keys, so that they are identical with
t3lib_div::getIndpEnv(), just lower-case? (reason 1 is consistancy, and
reason 2 is because I've implemented the similar feature using this key
name for a customer already ;-))
> (2) stat_apache_cutQuery = [boolean] will trigger cutting query parameters
> (anything behind '?') of the logged line
Fine
> (3) Though this is not an exact solution (which I think is not possible due to
> missing env var), it could be made configurable how to log hits with an empty
> Referer and User Agent (since Apache's direct address hits will be seen as empty
> referer by TYPO3). Introducing the property stat_apache_emptyReferer=[string]
> and stat_apache_emptyUserAgent=[string]
What is exactly the problem here? Currently an empty referer gets
replaced with a dash, which seems ok to me (also see
http://httpd.apache.org/docs/2.0/en/mod/mod_log_config.html/ and compare
how your Apache logs it).
Additionally, I have a comment on this line:
+ $LogLine.= '
"'.((t3lib_div::getIndpEnv('HTTP_REFERER'))?t3lib_div::getIndpEnv('HTTP_REFERER'):$this->config['config']['stat_apache_emptyReferer']).'"';
It calls the same function twice, which I think should be optimized with
little effort.
> (4) On behalf of Thomas Oppelt: Add a LogLine hook to tslib_fe->statistics():
> TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sys_stat-PreLogClass'][]->createLogLine($LogLine,$this)
Did not check if the functionality works, so this is just about the name
of the hook. "sys_stat" indicates a relationship with the sys_stat
extension. This is ok for the first hook which is already existing
because it is wrapped inside a condition: if (isLoaded('sys_stat')).
I don't have a better suggestion at hand though.
> Notes:
> This feature was already suggested on 2007-11-10 to this list but Martin
> Kutschker had some good suggestions/corrections to the former patch. Those are
> respected within this version.
Seen this. And as I mentioned above already, I have made a similar patch
which does the same, and some more things like logging of pages not
found and logging of fe_user names according to Apaches behaviour.
I will send it to you so you can have a look at it, however there is no
dependency with this change here.
- michael
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list