TinyLog is a simple and lightweight logging framework for Java. We can use tinylog with Java, Kotlin, Scala, and Android applications.
TinyLog是Java的简单轻量级日志记录框架。 我们可以将tinylog与Java,Kotlin,Scala和Android应用程序一起使用。
TinyLog日志记录框架的好处 (Benefits of TinyLog Logging Framework)
- Avoids boiler-plate code of Logger initialization. The Logger class in tinylog is static and used directly to log messages. 避免Logger初始化的样板代码。 tinylog中的Logger类是静态的,可直接用于记录消息。
- Support for other popular JVM languages such as Kotlin and Scala. 支持其他流行的JVM语言,例如Kotlin和Scala。
- Support for android applications too using logcat. 也支持使用logcat的android应用程序。
- The tinylog jars are lightweight and small in size. The tinylog 2.x version API jar is 48 kb and implementation jar is 72 kb only. tinylog罐子重量轻且尺寸小。 tinylog 2.x版本的API jar为48 kb,实现jar为72 kb。
- The output can be sent to Console, File, database using JDBC and DataSource. 可以使用JDBC和DataSource将输出发送到控制台,文件,数据库。
- The configuration file is very simple. For simple console based logging, we don’t need any configuration file. 配置文件非常简单。 对于基于控制台的简单日志记录,我们不需要任何配置文件。
- It’s free and open source. The complete project code is hosted on GitHub. 它是免费和开源的。 完整的项目代码托管在GitHub上 。
- According to their own benchmarking, they are much faster than Log4J logging framework. 根据他们自己的基准测试 ,它们比Log4J日志记录框架快得多。
- There is no dependency on any other API and framework. 不依赖于任何其他API和框架。
- Support for creating tags to categorize the log messages. It’s very useful in filtering log messages from a huge log file. 支持创建标签以对日志消息进行分类。 这对于从巨大的日志文件中过滤日志消息非常有用。
- Lazy Logging support to defer expensive computatio