tl;dr: The extension logging brings the logging framework monolog to TYPO3 CMS. Included is a backend module to list & filter log entries. Logging is an important part of an application which is not only useful during the development phase but also later on to be able know very fast if something does go wrong.
For me it makes more sense to bring the original code into the world of TYPO3 instead of manually backporting it. This is one of the goals of my extension “logging”. You can find it here.
Monolog is an awesome logging framework. The 2 main parts are Handlers and Processors.
Handlers are used to do something with a log entry. Most important available actions are:
- Log to files and syslog
- Send mails and alerts to slack,flowdock, hipchat, …
- Log specific servers and networked logging using amqp, graylog, socket, …
- Logging in development to the console of your browser
- Log to databases like redis, mongodb, couchdb, elasticsearch, …
A log entry can contain more information than the message itself. Examples are:
- Line number and file where the call came from
- Current URL
Using monolog in TYPO3 CMS
The extension logging requires TYPO3 CMS 7.x and works currently only if installed with composer.
Besides the integration of monolog you will also get:
- A custom processor to add some additional information like the user ID and the IP.
- A custom Handler to write log entries into the database of TYPO3.
- A nice backend module to list & filter the log entries
How to use
Please follow the installation instructions.
After the installation you can place a simple configuration in your
file which could look like this:
After that you are ready to go with starting logging in your classes: