Bug #40580
Exception when using SQL logger in Production Context
Status: | Resolved | Start date: | 2012-09-04 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 100% |
|
Category: | Log | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git 1.2 (master) |
Description
when having the SQL logger active in Prodution context, an exception occur, saying that
Catchable Fatal Error: Argument 4 passed toUncaught Exception
TYPO3\FLOW3\Log\LoggerFactory::create() must be of the type array, null
given, called in...
which makes sense, since the mentioned argument 4 is a setting (http://git.typo3.org/FLOW3/Packages/TYPO3.FLOW3.git?a=blob;f=Configuration/Objects.yaml;h=d6ed6e3040311d08a48062a7bc547147695ec102;hb=master#l188):
1'TYPO3\FLOW3\Persistence\Doctrine\Logging\SqlLogger':
2 properties:
3 logger:
4 object:
5 factoryObjectName: TYPO3\FLOW3\Log\LoggerFactory
6 arguments:
7 1:
8 value: 'Sql_Queries'
9 2:
10 value: 'TYPO3\FLOW3\Log\Logger'
11 3:
12 value: 'TYPO3\FLOW3\Log\Backend\FileBackend'
13 4:
14 setting: TYPO3.FLOW3.log.sqlLogger.backendOptions
but the mentioned section is only available in Developmnent/Settings.yaml (http://git.typo3.org/FLOW3/Packages/TYPO3.FLOW3.git?a=blob;f=Configuration/Development/Settings.yaml;h=332c4daabc94c75523012d0b8e0ac88289a130d4;hb=master#l43):
1TYPO3:
2 FLOW3:
3# [...]
4 sqlLogger:
5 backendOptions:
6 logFileURL: %FLOW3_PATH_DATA%Logs/Query_Development.log
7 createParentDirectories: TRUE
8 severityThreshold: %LOG_DEBUG%
9
Associated revisions
[BUGFIX] Fix SQL logging in Production context
The logger factory in Objects.yaml refers to a Setting directive which
with this change is present in Production context. Before, the Settings
could not be found, resulting in a NULL argument where an array is
expected as soon as query logging was enabled in Production.
Some cleanup to logging settings along the way.
Change-Id: Id8746ba896ec8552aaa3668e78e04efe9ce32e01
Fixes: #40580
Releases: 1.1, 1.2
[BUGFIX] Fix SQL logging in Production context
The logger factory in Objects.yaml refers to a Setting directive which
with this change is present in Production context. Before, the Settings
could not be found, resulting in a NULL argument where an array is
expected as soon as query logging was enabled in Production.
Some cleanup to logging settings along the way.
Change-Id: Id8746ba896ec8552aaa3668e78e04efe9ce32e01
Fixes: #40580
Releases: 1.1, 1.2
History
#1 Updated by Gerrit Code Review almost 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14328
#2 Updated by Gerrit Code Review almost 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14328
#3 Updated by Gerrit Code Review almost 3 years ago
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/14494
#4 Updated by Adrian Föder almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 007e41ba3e8906661647579ecba37720be968f3b.