Task #71684

Logging Concepts

Added by Carsten Bleicker almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-11-19
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I realy have problems to understand all the different logging stuff.

There is a new psr logger.
Also there is a $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'].

Do they have something in common? What is the difference?

\TYPO3\CMS\Core\Log\LogLevel constants range values: 0-7
$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] range values: 0-4

NOTICE Level of $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = 1
NOTICE Level of \TYPO3\CMS\Core\Log\LogLevel::NOTICE = 5

History

#1 Updated by Markus Klein almost 4 years ago

  • Status changed from New to Needs Feedback
There are currently 4 logging variants:
  1. Old GeneralUtility::sysLog() => $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] and $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog'] options
  2. New Logging API => $GLOBALS['TYPO3_CONF_VARS']['LOG'] options (not setable via Install Tool), default log file location is typo3temp/logs/typo3_*.log
  3. GeneralUtility::devLog() => only used if special devlog extension is present
  4. logging used for content editing/history => (sys_log, sys_history) tables

First one was the first one and is used in almost all code older than 1/2 year(s).
Second one is used in all new code.

#2 Updated by Carsten Bleicker almost 4 years ago

Thank you Markus.

So GeneralUtility::sysLog() and GeneralUtility::devLog() isn't a decorator of new logging api?

How to configure new Logging API to log only "below" WARNING especially if Levels are so different?

How to configure new Logging API to log Levels into different Files?

Why devLog() and sysLog() isn't deprecated if there is a new PSR Logger?

#3 Updated by Markus Klein almost 4 years ago

Why devLog() and sysLog() isn't deprecated if there is a new PSR Logger?

Simply because nobody took the time to make them a decorator. Feel free to jump in. ;-)

How to configure new Logging API to log only "below" WARNING especially if Levels are so different?

Add the configuration to your typo3conf/AdditionalConfiguration.php. Docs for new API is in https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Logging/Index.html

For more questions I recommend to ask in the typo3-cms channel on Slack, as this is our bug tracker not our support forum. :-)
https://forger.typo3.org/slack

#4 Updated by Markus Klein almost 4 years ago

  • Status changed from Needs Feedback to Closed

#5 Updated by Carsten Bleicker almost 4 years ago

Markus Klein wrote:

Simply because nobody took the time to make them a decorator. Feel free to jump in. ;-)

Seems there is a change needed to make this things clear.
Why did you close the ticket if the problem is not fixed?

Also available in: Atom PDF