Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo3 6.2 and the LogManager #552

Closed
A-Kalkhoff opened this issue Oct 27, 2017 · 15 comments
Closed

Typo3 6.2 and the LogManager #552

A-Kalkhoff opened this issue Oct 27, 2017 · 15 comments

Comments

@A-Kalkhoff
Copy link

Hi,
in an older installation that has not yet been upgraded to Typo3 8.7 we just updated the realURL version from 2.2.1 to 2.3.
Now, 2 days later, we noticed that the typo3temp/Logs/typo3.log was growing rapidly, at the time of finding the reason/solution it was at 8.7GB of disk space.
The Typo3 LogManager seems to ignore every setting regarding LogLevel in Typo3 6.2 and all occurences of "$this->logger->debug()" log every time a page is called. We have the same realUrl Version in an 8.7 installation and it works just fine.
Haven't tested it in a 7.6 installation, but in it's current status realUrl 2.3.0 should not be marked as working for Typo3 6.2

@tantegerda1
Copy link
Contributor

Possible duplicate of #549?

@leslawp
Copy link

leslawp commented Nov 9, 2017

On Typo3 6.2 and 7.6 I have the same problem.
This is how the problem is developing. In Classes/Encoder/UrlEncoder.php in line 138 is where Realurl is producing debug info with the lowest possible priority, namely DEBUG. However Typo3 documentation says (https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Logging/Configuration/Index.html):

Calling $logger->debug($msg) will result in $msg being written only to the default log file (typo3temp/logs/typo3.log).

So this 'only' means that this log is growing very quickly. Indeed you may find some solutions in #549. I will let you know here if it helps.

@mediaessenz
Copy link

I can confirm this behavior under TYPO3 7.6.23 using realurl 2.3.0.
My typo3temp/logs/typo3_xzy.log file grews to over 34 GB (!) in one night.

@dmitryd
Copy link
Owner

dmitryd commented Dec 8, 2017

Sorry, may I ask why do you use debug logging in production?

@A-Kalkhoff
Copy link
Author

A-Kalkhoff commented Dec 8, 2017

I do not, it's not set to log on debug-level, but it's still logging on debug-level. For me that seems to be a bug in the LogManager in Typo3 6.2.

@dmitryd
Copy link
Owner

dmitryd commented Dec 8, 2017

Do you use that log at all? What about disabling it completely?

@A-Kalkhoff
Copy link
Author

Has been a long time, but I think I tested that as well and it didn't work.. I'm not too sure anymore and I can't test it currently due to being on vacation this month. But my boss wouldn't allow that in the end either way. Currently I just modified realurl and removed everything that had to do with logging in that installation

@DrillSergeant
Copy link

I don't think it's a good pratice to disable logging in production rather than eleminating the causes and monitoring the log.

@sgrossberndt
Copy link
Contributor

Same issue as #549. There is a pull request minimizing the logging amount in #551

@dmitryd
Copy link
Owner

dmitryd commented Dec 22, 2017

Should be fixed now.

@sgrossberndt
Copy link
Contributor

The merged change 2c66992 reintroduces the bug on TYPO3 >= 7.6 which was removed in
e3aac5c#diff-d568ec6aec101b811859fed48a5a9954

@dmitryd
Copy link
Owner

dmitryd commented Dec 22, 2017

It adds debug logging instead of error logging. You should not have debug logging in production anyway.

@sgrossberndt
Copy link
Contributor

Ah, sorry, I missed that. Thanks!

@dasoe
Copy link

dasoe commented May 17, 2018

Hi all, problem is existing for me, too, NOT connected to the Bad L parameter problem.
TYPO3 6.2.19
realUrl 2.3.2
[SYS][systemLogLevel] = 3
$TYPO3_CONF_VARS['FE']['debug'] = 0
$TYPO3_CONF_VARS['BE']['debug'] = 0

typo3temp/logs/typo3.log is flooded with messages like these:

Thu, 17 May 2018 11:08:23 +0200 [DEBUG] request="3335769d450b6" component="DmitryDulepov.Realurl.Encoder.UrlEncoder": Found speaking url "nc/zeitschriften.html" for original url "id=8&no_cache=1" and root page id 622 in cache 
Thu, 17 May 2018 11:08:23 +0200 [DEBUG] request="3335769d450b6" component="DmitryDulepov.Realurl.Encoder.UrlEncoder": Created speaking url "/nc/zeitschriften.html" from "id=8&no_cache=1" - {"LD":{"url":"\/index.php?id=8","target":"","type":"","orig_type":"","no_cache":"&no_cache=1","linkVars":"","sectionIndex":"","totalURL":"\/nc\/zeitschriften.html"},"args":{"page":{"uid":"8","pid":"622","tstamp":"1263717666","sorting":"2304","deleted":"0","perms_userid":"1","perms_groupid":"5","perms_user":"31","perms_group":"27","perms_everybody":"17","crdate":"1099497058","cruser_id":"1","title":"Zeitschriften","doktype":"1","TSconfig":"","storage_pid":"0","is_siteroot":"0","php_tree_stop":"0","tx_impexp_origuid":"0","url":"","hidden":"0","starttime":"0","endtime":"0","urltype":"1","shortcut":"0","shortcut_mode":"0","no_cache":"1","fe_group":"","subtitle":"","layout":"0","target":"","media":"2","lastUpdated":"0","keywords":"","cache_timeout":"0","newUntil":"0","description":"","no_search":"0","SYS_LASTCHANGED":"1525683838","abstract":"","module":"","extendToSubpages":"0","author":"","author_email":"","nav_title":"","content_from_pid":"0","mount_pid":"0","alias":"","nav_hide":"0","mount_pid_ol":"0","t3ver_oid":"0","t3ver_id":"0","t3ver_label":"","editlock":"0","l18n_cfg":"0","t3ver_wsid":"0","t3ver_state":"0","t3ver_stage":"0","t3ver_count":"0","t3ver_tstamp":"0","t3_origuid":"0","fe_login_mode":"0","tx_realurl_pathsegment":"","t3ver_move_id":"0","tx_oeoekomabc_abckeywords":"0","tx_realurl_exclude":"0","url_scheme":"0","backend_layout":"0","backend_layout_next_level":"0","tx_realurl_pathoverride":"0","tx_realurl_nocache":"0","tx_advancedsitemaps_priority":"","tx_advancedsitemaps_changeFreq":"","tx_kesearch_tags":null,"cache_tags":"","categories":"0","menuImage":"","menuImageHover":""},"oTarget":"","no_cache":null,"script":"index.php","overrideArray":"","addParams":"","typeOverride":null,"targetDomain":""},"typeNum":null}

Do I miss something?

@dmchn
Copy link

dmchn commented Jun 15, 2018

@dasoe

I experienced the same issue after upgrading a very outdated Typo 3 6.2 setup to the highest possible 6.2 release and updating the extension. In fact, it killed the site as the space went full quickly. While researching the thread popped up, so here is the fix:

Apart from the missing value absRefPrefix=/ in the main script for the site, this actually fixed the logging issue:

Created the file typo3conf/AdditionalConfiguration.php
Added this code:
$GLOBALS['TYPO3_CONF_VARS']['LOG']['DmitryDulepov']['Realurl'] = array( 'writerConfiguration' => array( \TYPO3\CMS\Core\Log\LogLevel::WARNING => array( \TYPO3\CMS\Core\Log\Writer\FileWriter::class => array( 'logFile' => 'typo3temp/logs/tx_realurl.log' ) ) ) );
Obvoiusly the default logging level is set to DEBUG. After adding the fix, a dedicated log has been created and stayed empty since than. You may want to redirect the log to typo3.log or add a date suffix as seen in the original code I actually found here:
https://github.com/dmitryd/typo3-realurl/wiki/Troubleshooting

Hope it's useful...

@dmitryd dmitryd closed this as completed in b0aa293 Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants