14
Logging with TYPO3 CMS & monolog

Logging with TYPO3 CMS and monolog

Embed Size (px)

Citation preview

Page 1: Logging with TYPO3 CMS and monolog

Logging with TYPO3 CMS

& monolog

Page 2: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Agenda

✓ Monolog

✓ Integration in TYPO3 CMS

✓ Demo

✓ Questions?

Page 3: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Monolog

✓ Popular logging API in PHP

✓ https://github.com/Seldaek/monolog

Concepts based on

✓ Handler

✓ Processor

✓ Formatter

Page 4: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Handler

✓ Files & Syslog

✓ Send alerts & emails

✓ Email, Swiftmail, HipChat, Slack, ...

✓ Log servers & network logging

✓ AMQP, Graylog2, NewRelic, Syslogd, ...

✓ Logging in Development

✓ FirePHP, Chrome, ...

✓ Log to the Database

✓ Redis, MongoDB, CouchDB, …

✓ TYPO3 Database

Monolog

Page 5: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Processor

✓ Git information

✓ Memory

✓ Current URLS

✓ …

✓ TYPO3 Processor

Monolog

Page 6: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Formatter

✓ HTML

✓ Json

✓ Line

✓ specific Formatters

Monolog

Page 7: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

TYPO3 EXT logging

✓ https://github.com/georgringer/logging

✓ Requirements

✓ PHP 5.5 => PHP 5.4

✓ CMS 7 => 6.2 LTS

Let’s take a look!

Page 8: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

EXT:logging

Backend module

Page 9: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

EXT:logging

Configuration I

$GLOBALS['TYPO3_CONF_VARS']['MONOLOG'] = array(

'processorConfiguration' => array(

'Monolog\\Processor\\IntrospectionProcessor' => array(),

\GeorgRinger\Logging\Log\Monolog\Processor\Typo3Processor::class =>

array(),

)

);

Page 10: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

EXT:logging

Configuration II

$GLOBALS['TYPO3_CONF_VARS']['MONOLOG'] = array(

'handlerConfiguration' => array(

'name' => 'montagmorgen.at',

'handlers' => array(

\Monolog\Handler\StreamHandler::class => array(

PATH_site . 'typo3temp/out.log',

\Monolog\Logger::WARNING

),

\GeorgRinger\Logging\Log\Monolog\Handler\DatabaseHandler::class

=> array()

));

Page 11: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

EXT:logging

Logging to Graylog2

Page 12: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Questions? Thanks!

Page 13: Logging with TYPO3 CMS and monolog

inspiring people to

share.

Page 14: Logging with TYPO3 CMS and monolog

T3BOARD15TYPO3

Inspiring people to share

Georg Ringer

✓ TYPO3 developer user since 2005

(first extension still in production!)

✓ TYPO3 CMS core developer

✓ Member of the TYPO3 Security Team

✓ working at Cyberhouse Gmbh

✓ montagmorgen.at