You can add logging to a file by attaching a Handler to the LogManager, as shown in Listing 5.
可以通过为 LogManager 附加一个 Handler 将日志记录添加到文件,如清单 5 所示。
The problem with this approach is that the LogManager instance uses the system class loader to instantiate classes from the configuration file.
这种方法的问题是 LogManager 实例使用了系统类的装载程序从配置文件中对类进行实例化。
应用推荐