This document discusses how to connect logs to various network services using Logback. It begins with a brief introduction of common logging frameworks like SLF4J, Log4j 1, Log4j 2 and Logback. It then explains Logback's internal architecture including loggers, appenders and layouts. The main part demonstrates how to develop a custom appender in Logback to send logs to network services by utilizing the ILoggingEvent object. It provides code templates and examples of accessing log content and stack traces. Finally, it introduces some open source Logback appenders and the Logpush service for remote log monitoring.
30. 30
Architecture
● Logger
– effective level
– basic selection rule
● Appender
– output destination
– i.e. console, files, remote socket servers, DB, JMS, and remote
UNIX Syslog daemons
● Layout
– formatting the event to string
31. 31
Architecture - flow
● Get the filter chain decision
● Apply the basic selection rule
● Create a LoggingEvent object
● Invoking appenders
● Formatting the output
● Sending out the LoggingEvent
72. 72
Appenders @ kewang
● logback-redmine-appender
– merge the same StackTraces @ one issue
● logback-sms-appender
73. 73
Appenders @ kewang
● logback-redmine-appender
– merge the same StackTraces @ one issue
– link StackTraces with git repo
● logback-sms-appender
74. 74
Appenders @ kewang
● logback-redmine-appender
– merge the same StackTraces @ one issue
– link StackTraces with git repo
– nested tag
● logback-sms-appender
75. 75
Appenders @ kewang
● logback-redmine-appender
– merge the same StackTraces @ one issue
– link StackTraces with git repo
– nested tag
● logback-sms-appender
– custom output
76. 76
Appenders @ kewang
● logback-redmine-appender
– merge the same StackTraces @ one issue
– link StackTraces with git repo
– nested tag
● logback-sms-appender
– custom output
– only append ERROR level