Refactoring
TYPO3 Logging

Image by “digital cat”: http://www.flickr.com/people/14646075@N03/
About me
✗

Steffen Müller

✗

/gebrüderheitz GbR

✗

Freiburg/Germany

✗

TYPO3 developer

✗

9 years experience with TYP...
Main Project Team

Steffen Gebert

Ingo Renner
Steffen Müller

Refactoring TYPO3 Logging at #t3dd12
About you
Tell us in 2-3 Sentences:
✗

Who are you?

✗

What are your TYPO3 skills?

✗

What you expect from the workshop?...
Workshop Topics
✗

Overview
Project goals
✗ What has been done so far?
Hands on
✗

✗

✗
✗
✗

Test and review the Logging A...
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
The Logging Dilemma

Refactoring TYPO3 Logging at #t3dd12
Refactoring Goals
✗

New Logging API

✗

Replace existing log calls in core with new API calls

✗

New BE module

✗

Showc...
What has been done so far?
✗

New Logging API in t3lib/log/

✗

Incubator git repository

✗

Proof-of-concept:
✗
✗

Config...
The new Logging API
✗

A single API

✗

Extensible

✗

Configurable

✗

Up to 100% covered with UnitTests

Refactoring TYP...
API Overview

Refactoring TYPO3 Logging at #t3dd12
LogManager

Refactoring TYPO3 Logging at #t3dd12
LogLogger

Refactoring TYPO3 Logging at #t3dd12
LogLevel

Refactoring TYPO3 Logging at #t3dd12
LogRecord

Refactoring TYPO3 Logging at #t3dd12
LogRecord

Refactoring TYPO3 Logging at #t3dd12
LogWriters

Refactoring TYPO3 Logging at #t3dd12
Example usage
✗

Instanciate Logger:

$logger = t3lib_log_LogManager::getLogger(__CLASS__);
✗

Write log event:

$logger->...
Possible Workgroups
✗

Testing and reviewing the current API code

✗

Coding a custom LogWriter extension

✗

Porting the ...
Project Resources
✗

Logging API directory: t3lib/log/

✗

Workshop Wiki:
http://forge.typo3.org/projects/typo3v4-logging/...
Upcoming SlideShare
Loading in …5
×

Refactoring TYPO3 Logging

1,490 views
1,331 views

Published on

Slides for a workshop at TYPO3 Developer Days 2012 which was called: "Refactoring TYPO3 Logging".

The slides mainly cover two topics: The current Logging dilemma in TYPO3v4 and the architecture of the new Logging API in TYPO3v6

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,490
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Refactoring TYPO3 Logging

  1. 1. Refactoring TYPO3 Logging Image by “digital cat”: http://www.flickr.com/people/14646075@N03/
  2. 2. About me ✗ Steffen Müller ✗ /gebrüderheitz GbR ✗ Freiburg/Germany ✗ TYPO3 developer ✗ 9 years experience with TYPO3 ✗ Twitter: @t3node ✗ TYPO3 Blog: http://www.t3node.com Refactoring TYPO3 Logging at #t3dd12
  3. 3. Main Project Team Steffen Gebert Ingo Renner Steffen Müller Refactoring TYPO3 Logging at #t3dd12
  4. 4. About you Tell us in 2-3 Sentences: ✗ Who are you? ✗ What are your TYPO3 skills? ✗ What you expect from the workshop? Image by Dierk Schaefer: http://www.flickr.com/people/dierkschaefer/ Then add yourself to the Forge Project: http://forge.typo3.org/projects/typo3v4-logging Refactoring TYPO3 Logging at #t3dd12
  5. 5. Workshop Topics ✗ Overview Project goals ✗ What has been done so far? Hands on ✗ ✗ ✗ ✗ ✗ Test and review the Logging API Code some nasty stuff Your suggested topic! Refactoring TYPO3 Logging at #t3dd12
  6. 6. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  7. 7. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  8. 8. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  9. 9. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  10. 10. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  11. 11. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  12. 12. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  13. 13. The Logging Dilemma Refactoring TYPO3 Logging at #t3dd12
  14. 14. Refactoring Goals ✗ New Logging API ✗ Replace existing log calls in core with new API calls ✗ New BE module ✗ Showcase extensions ✗ Documentation Refactoring TYPO3 Logging at #t3dd12
  15. 15. What has been done so far? ✗ New Logging API in t3lib/log/ ✗ Incubator git repository ✗ Proof-of-concept: ✗ ✗ Configuration $TYPO3_CONF_VARS['LOG'] Replaced t3lib_div::devLog and sysLog Refactoring TYPO3 Logging at #t3dd12
  16. 16. The new Logging API ✗ A single API ✗ Extensible ✗ Configurable ✗ Up to 100% covered with UnitTests Refactoring TYPO3 Logging at #t3dd12
  17. 17. API Overview Refactoring TYPO3 Logging at #t3dd12
  18. 18. LogManager Refactoring TYPO3 Logging at #t3dd12
  19. 19. LogLogger Refactoring TYPO3 Logging at #t3dd12
  20. 20. LogLevel Refactoring TYPO3 Logging at #t3dd12
  21. 21. LogRecord Refactoring TYPO3 Logging at #t3dd12
  22. 22. LogRecord Refactoring TYPO3 Logging at #t3dd12
  23. 23. LogWriters Refactoring TYPO3 Logging at #t3dd12
  24. 24. Example usage ✗ Instanciate Logger: $logger = t3lib_log_LogManager::getLogger(__CLASS__); ✗ Write log event: $logger->log(t3lib_log_Level::ERROR, 'My Message'); ✗ Shorthand syntax: $logger->error('My Message'); ✗ Additional data: $logger->debug('My Message', array('foo' => 'bar')); ✗ Method chaining: t3lib_log_LogManager::getLogger(__CLASS__)->error('lol'); Refactoring TYPO3 Logging at #t3dd12
  25. 25. Possible Workgroups ✗ Testing and reviewing the current API code ✗ Coding a custom LogWriter extension ✗ Porting the current code to a backport extension ✗ Configuration ✗ Performance / Profiling Refactoring TYPO3 Logging at #t3dd12
  26. 26. Project Resources ✗ Logging API directory: t3lib/log/ ✗ Workshop Wiki: http://forge.typo3.org/projects/typo3v4-logging/wiki/T3DD12Workshop ✗ Forge Project: Logging Improvements http://forge.typo3.org/projects/typo3v4-logging ✗ Git: Incubator, branch project-logging-t3dd12 git://git.typo3.org/TYPO3v4/Incubator.git ✗ Refactoring TYPO3 Logging at #t3dd12

×