Feature #80289

Alow to globally disable devLog

Added by Artur Cichosz over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2017-03-15
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Somehow I always assumed that $GLOBALS["TYPO3_CONF_VARS"]['SYS']['enable_DLOG'] = 0 globally disables devLog.
Since today I know I was wrong after we discovered, that the database of one project grew up to 25GB in just few weeks.
So I tried to investigate why devLog is stil writing data even though I have seen 'enable_DLOG' = 0.
I see now that the API method GeneralUtility::devLog() dos not care about that setting at all. It is up to the devLog extension developer to check if he actually can call this method.

This is not very fortunate in my opinion. A developer can forget to check for TYPO3_DLOG==1 and the user of such extension is fully unaware of the implications.

I find it much more consistent and clear, if the setting ['enable_DLOG'] = 0 globaly disables any devLog possibilities.

Associated revisions

Revision 228489ea (diff)
Added by Benni Mack over 2 years ago

[BUGFIX] Check for enabled devlog inside devLog()

Calling GeneralUtility::devLog() can be called but
the method itself should check whether the devlog
is enabled, instead of having third-party code
rely on checking the option with an if statement.

This effectively removes the need for checks on
if (TYPO3_DLOG) and the other two constants TYPO3_ERROR_DLOG
and TYPO3_EXCEPTION_DLOG in all callers' code.

Resolves: #80289
Releases: master, 8.7
Change-Id: Ibaeeca6300bdb37a513a07fb46c2616cfc51c7f2
Reviewed-on: https://review.typo3.org/52751
Tested-by: TYPO3com <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision b2f6aa31 (diff)
Added by Benni Mack over 2 years ago

[BUGFIX] Check for enabled devlog inside devLog()

Calling GeneralUtility::devLog() can be called but
the method itself should check whether the devlog
is enabled, instead of having third-party code
rely on checking the option with an if statement.

This effectively removes the need for checks on
if (TYPO3_DLOG) and the other two constants TYPO3_ERROR_DLOG
and TYPO3_EXCEPTION_DLOG in all callers' code.

Resolves: #80289
Releases: master, 8.7
Change-Id: Ibaeeca6300bdb37a513a07fb46c2616cfc51c7f2
Reviewed-on: https://review.typo3.org/53207
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Riccardo De Contardi over 2 years ago

  • Category set to Logging

#2 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#4 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#5 Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#6 Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#8 Updated by Gerrit Code Review over 2 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52751

#9 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53207

#10 Updated by Benni Mack over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF