Java应用日志框架 TNT4J
本文导语: TNT4J是一个改进Log4J新的开源Java应用日志框架。用于应用程序活动的跟踪、相关性检查、诊断,可以跨多个应用程序,运行时,服务器,地理的位置。这个API是专门用以解决分布式,并发,多线程,多用户应用,包括活动的相...
以下是它的特性:
Simple programming model to facilitate fast root-cause, log analysis
Automated timing of application activities and sub-activities (elapsed, idle time, message age)
Application state dump framework for reporting internal variables, data structures
Granular conditional logging based on application tokens, patterns, that can be shared accross applications, runtimes
Share logging context across application, thread, runtime boundaries
Inter-log correlation of log entries (correlators and tags) between multiple related applications
Intra-log correlation of related activities and sub-activities between multiple applications and threads
Event location tags such as GPS, server etc.
Message flow direction for composite applications that exchange messages (e.g. SOAP, JMS, and SQL etc.)
User defined properties such as CPU, memory logging, thread statistics per process/thread
Extensible activity, sink, error listeners for pre, post event processing
Granular context such as thread id, process id, server, application name
1. 不需要写 "logger.isDebugEnabled()"
2. can log based on filter (e.g wait time longer than certain value)
3. share logging context across apps. 调用路径信息串联起来
4. logging statistics关于日志的统计信息