# TYPO3-CMS extension Retrostats This extension copies the exact functionality for writing the Apache-style log files as used to be part of the core until v4.7. The only issue to take care of is to add the [FE][logfile_dir] setting in AdditionalConfiguration.php instead of LocalConfiguration because the Install tool will remove it otherwise. All TypoScript settings should work as they used to do. Development versions can be found in this github repository. Released versions of the extension are here: http://typo3.org/extensions/repository/view/retrostats ## Configuration The ['TYPO3_CONF_VARS']['FE']['logfile_dir'] setting should be placed in AdditionalConfiguration.php instead of LocalConfiguration.php, because the Install tool will remove it as it's no longer a known TYPO3 setting. If you don't already have it, create the file `AdditionalConfiguration.php` inside directory typo3conf with the following contents: a, à => a, α "alpha" => a), which yields nice and readable page titles in the log. All non-ASCII characters that cannot be converted will be changed to underscores. If set to "utf-8", the page title will be converted to UTF-8 which results in even more readable titles, if your log analyzing software supports it. | | stat_apache_noRoot | boolean | If set, the root part (level 0) of the path will be removed from the path. This makes a shorter name in case you have only a redundant part like "home" or "my site". | | stat_titleLen | int 1-100 | The length of the page names in the path written to log file/database | 20 | | stat_pageLen | int 1-100 | The length of the page name (at the end of the path) written to the log fle/database. | 30 | | stat_IP_anonymize | boolean | (Since TYPO3 4.7) Set to 1 to activate anonymized logging. Setting this to 1 will log an empty hostname and will enable anonymization of IP addresses. | 0 | | stat_IP_anonymize_mask_ipv4 | int | (Since TYPO3 4.7); Prefx-mask 0..32 to use for anonymisation of IP addresses (IPv4). Only used, if stat_IP_anonymize is set to 1.; Recommendation for Germany: config.stat_IP_anonymize_ipv4 = 24 | 24 | | stat_IP_anonymize_mask_ipv6 | int | (Since TYPO3 4.7); Prefx-mask 0..128 to use for anonymisation of IP addresses (IPv6). Only used, if stat_IP_anonymize is set to 1. Recommendation for Germany: config.stat_IP_anonymize_ipv6 = 64 | 64 | | stat_logUser | boolean | (Since TYPO3 4.7) Confgure whether to log the username of the Frontend user, if the user is logged in in the FE currently. Setting this to 0 allows to anonymize the username. | 1 | ### Example TypoScript (setup) Setting the following options will be sufficient in most cases. The first 3 settings (stat, stat_apache and stat_apache_logfile) are essential, the rest is optional. config { // Necessary configuration options: stat = 1 stat_apache = 1 stat_apache_logfile = www.mysite.com.log // Optional: // This one is adviced in combination with realurl: stat_apache_pagenames = [request_uri] stat_excludeBEuserHits = 1 stat_excludeIPList = xxx.xx.xx.xxx,yy.yy.yyy.yyy }