Project

General

Profile

Actions

Feature #94600

closed

Epic #94356: Embrace PSR-3

Use Monolog for injected logging services

Added by Larry Garfield over 2 years ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Should have
Category:
Logging
Target version:
Start date:
2021-07-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Monolog is a much more robust logger than the existing one in core. There's no sense competing with it, just leveraging it effectively.

This design is driven by a new `typo3conf/logging.yaml` file. Its format looks like this:

monolog:
  channels:
    default:
      handlers: ['@Monolog\Handler\SyslogHandler']
      processors: ['@Monolog\Processor\MemoryUsageProcessor']
      min_level: info
    deprecations:
      handlers: ['@Monolog\Handler\SyslogHandler']
      processors: ~
      min_level: DEBUG
  classes:
    Foo\Bar:
      handlers: [ '@monolog.stream.deprecations' ]
      processors: ~
      min_level: DEBUG

An arbitrary number of channels may be predefined, each with its own configuration. Configuration consists of which handlers (by service name) and processors (by service name) are desired. There's also the ability to set a minimum log level that the channel will care about. (I think; that may be on the handler level in Monolog. Still researching, but the above is the intent.)

A service may ask for a logger by name for injection ( ['@monolog.logger.mychannel]), or just ask for the generic "logger" service. If it does the latter, the channel to use is derived from the argument name. So a constructor parameter of $beepLogger will get the logger for the "beep" channel. If no beep channel is defined explicitly, it will get the same configuration as the default.

Per-class overrides are also possible, creating a virtual channel for just that class.

All that I still have not working is setting a minimum log level for each channel or handler, as I'm not sure that Monolog actually has a facility for that. I thought it did but I've not located it.

Actions #1

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/c/Packages/TYPO3.CMS/+/70014

Actions #2

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/c/Packages/TYPO3.CMS/+/70014

Actions #3

Updated by Larry Garfield over 2 years ago

  • Description updated (diff)
Actions #4

Updated by Larry Garfield over 2 years ago

  • Description updated (diff)
Actions #5

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/c/Packages/TYPO3.CMS/+/70014

Actions #6

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/c/Packages/TYPO3.CMS/+/70014

Actions #7

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/c/Packages/TYPO3.CMS/+/70014

Actions #8

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/c/Packages/TYPO3.CMS/+/70014

Actions #9

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/c/Packages/TYPO3.CMS/+/70014

Actions #10

Updated by Gerrit Code Review over 2 years ago

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

Actions #11

Updated by Gerrit Code Review over 2 years ago

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

Actions #12

Updated by Gerrit Code Review over 2 years ago

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

Actions #13

Updated by Gerrit Code Review over 2 years ago

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

Actions #14

Updated by Gerrit Code Review over 2 years ago

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

Actions #15

Updated by Gerrit Code Review over 2 years ago

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

Actions #16

Updated by Gerrit Code Review over 2 years ago

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

Actions #17

Updated by Gerrit Code Review over 2 years ago

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

Actions #18

Updated by Gerrit Code Review over 2 years ago

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

Actions #19

Updated by Gerrit Code Review over 2 years ago

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

Actions #20

Updated by Gerrit Code Review over 2 years ago

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

Actions #21

Updated by Gerrit Code Review over 2 years ago

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

Actions #22

Updated by Gerrit Code Review over 2 years ago

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

Actions #23

Updated by Gerrit Code Review over 2 years ago

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

Actions #24

Updated by Gerrit Code Review over 2 years ago

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

Actions #25

Updated by Benni Mack over 2 years ago

  • Target version changed from 11.4 to 12 LTS
Actions #26

Updated by Gerrit Code Review over 2 years ago

Patch set 23 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70014

Actions #27

Updated by Christian Kuhn about 1 year ago

  • Status changed from Under Review to Rejected
Actions

Also available in: Atom PDF