• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SLF4J+Logback
 

SLF4J+Logback

on

  • 6,970 views

 

Statistics

Views

Total Views
6,970
Views on SlideShare
6,807
Embed Views
163

Actions

Likes
6
Downloads
100
Comments
0

13 Embeds 163

http://albert-myptc.blogspot.com 69
http://wiki.kthcorp.com 45
http://www.slideshare.net 12
http://albert-myptc.blogspot.tw 11
http://albert-myptc.blogspot.hk 5
http://doc.pa3hu.com 5
http://albert-myptc.blogspot.com.br 4
http://albert-myptc.blogspot.de 4
http://albert-myptc.blogspot.hu 3
http://albert-myptc.blogspot.com.au 2
http://albert-myptc.blogspot.no 1
http://albert-myptc.blogspot.it 1
http://albert-myptc.blogspot.fr 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SLF4J+Logback SLF4J+Logback Presentation Transcript

    • SLF4J + Logback
      Albert
      junyuo@gmail.com
    • Simple Logging Facade for Java (SLF4J)
      Logback
      Pre-requistes
      Configuration example
      Reference
      2
      Agenda
    • The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time.
      http://www.slf4j.org/
      Simple Logging Facade for Java (SLF4J)
      3
    • 4
    • Projects depending on SLF4J
      5
    • No revolution, only evolution.
      log4j is no longer being actively developed
      The same basic plumbing only done better.
      Faster, smaller, higher gas mileage, and generally more bang for the buck.
      6
      LOGBack
    • Logback offers a native implementation of the SLF4J API => Logback exposes its logging API through SLF4J.
      If you are using logback, you are actually using SLF4J
      SLF4J can delegate to log4j, logback, java.util.logging or JCL
      SLF4J can bridge log4j, JCL and j.u.l.
      7
      logback-classic implements SLF4J
    • logback.xml
      slf4j-api.jar
      logback-classic.jar
      logback-core.jar
      8
      Pre-requistes
    • 9
      Configuration example
    • 10
      Configuration example – cont.
      ConsoleAppender
      RollingFileAppender
      rollover daily or whenever the
      file size reaches 100MB
    • 11
      Configuration example – cont.
    • 12
      Configuration example – cont.
      ConsoleAppender
      RollingFileAppender
    • SLF4J
      http://www.slf4j.org/
      Logback
      http://logback.qos.ch/
      Chapter 4: Appenders
      http://logback.qos.ch/manual/appenders.html
      13
      Reference