Project

General

Profile

Actions

Task #71684

closed

Logging Concepts

Added by Carsten Bleicker over 8 years ago. Updated over 8 years ago.

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

0%

Estimated time:
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

Actions #1

Updated by Markus Klein over 8 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.

Actions #2

Updated by Carsten Bleicker over 8 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?

Actions #3

Updated by Markus Klein over 8 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

Actions #4

Updated by Markus Klein over 8 years ago

  • Status changed from Needs Feedback to Closed
Actions #5

Updated by Carsten Bleicker over 8 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?

Actions

Also available in: Atom PDF