异常的 log4j.category.DataNucleus 是什么?
log4j.logger.DataNucleus
一般的
我不使用 Eclise 也不使用 Log4J(当然,DataNucleus 使用它除外)。我的日志配置文件中有以下内容。
log4j.properties
log4j.appender.A1 = org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern = %d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
[...]
# Tighten logging on the DataNucleus categories to WARN.
# This DataNucleus logging configuration appears redundant; in production,
# DataNucleus uses Java logging instead.
log4j.logger.DataNucleus = WARN, A1
log4j.logger.DataNucleus.JDO = WARN, A1
log4j.logger.DataNucleus.Persistence = WARN, A1
log4j.logger.DataNucleus.Query = WARN, A1
log4j.logger.DataNucleus.Lifecycle = WARN, A1
log4j.logger.DataNucleus.Cache = WARN, A1
log4j.logger.DataNucleus.MetaData = WARN, A1
log4j.logger.DataNucleus.Management = WARN, A1
log4j.logger.DataNucleus.General = WARN, A1
log4j.logger.DataNucleus.Connection = WARN, A1
log4j.logger.DataNucleus.Transaction = WARN, A1
log4j.logger.DataNucleus.Datastore = WARN, A1
log4j.logger.DataNucleus.ClassLoading = WARN, A1
log4j.logger.DataNucleus.Plugin = WARN, A1
log4j.logger.DataNucleus.ValueGeneration = WARN, A1
log4j.logger.DataNucleus.Enhancer = WARN, A1
log4j.logger.DataNucleus.SchemaTool = WARN, A1
日志记录属性
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
[...]
# Set the default logging level for ORM, specifically, to WARNING
DataNucleus.level = WARNING
DataNucleus.JDO.level = WARNING
DataNucleus.Persistence.level = WARNING
DataNucleus.Query.level = WARNING
DataNucleus.Lifecycle.level = WARNING
DataNucleus.Cache.level = WARNING
DataNucleus.MetaData.level = WARNING
DataNucleus.Management.level = WARNING
DataNucleus.General.level = WARNING
DataNucleus.Connection.level = WARNING
DataNucleus.Transaction.level = WARNING
DataNucleus.Datastore.level = WARNING
DataNucleus.ClassLoading.level = WARNING
DataNucleus.Plugin.level = WARNING
DataNucleus.ValueGeneration.level = WARNING
DataNucleus.Enhancer.level = WARNING
DataNucleus.SchemaTool.level = WARNING
logger.fatal(“应用程序错误”);
我从未编写过 Log4J。这个命令是否不只是记录"App Error"
致命级别的文本条目?
享受?