How to log all Flash messages?

160 Views Asked by At

In order to see which errors recur and helping the user support, I would like to log all flash error messages to a file. Is there a hook in the Typo3 Flash Messaging system for this?

(Using v7.6)

2

There are 2 best solutions below

0
On

One could overload TYPO3\CMS\Core\Messaging\FlashMessageQueue so that addMessage() also logs the message...

1
On

TYPO3 generates many logs for user help and support, it is mostly generates deprication logs after upgradation of typo3. But there is option weather to store generated logs so, user can avoid more generated logs and avoid such warnings and errors.

'enableDeprecationLog' => false | file (or integer "1") | devlog | console,

You can set one of the above option for deprecation log, if false not log will be generated.

String: "file" (or integer "1")

The log file will be written to typo3conf/deprecation_[hash-value].log

String: "devlog"

The log will be written to the development log

String: "console"

The log will be displayed in the Backend's Debug Console.