miwoo(miwoo)兄弟,以下是我的log4j.properties文件内容: # For the general syntax of property based configuration files see the # documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is # specified, the root category assumes the default priority for root # which is DEBUG in log4j. The root category is the only category that # has a default priority. All other categories need not be assigned a # priority in which case they inherit their priority from the # hierarchy.#log4j.rootCategory=ERROR,A1 # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=ERROR,A1 # A1 is set to be a ConsoleAppender. #log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=C:/GBase/NsLog4j_debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout# Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n# A1 is set to be a LF5Appender which outputs to a swing # logging console.#log4j.appender.A1=org.apache.log4j.lf5.LF5Appender #log4j.appender.A1.MaxNumberOfRecords=1000
miwoo(miwoo)兄弟,以下是我的log4j.properties文件内容: # For the general syntax of property based configuration files see the # documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is # specified, the root category assumes the default priority for root # which is DEBUG in log4j. The root category is the only category that # has a default priority. All other categories need not be assigned a # priority in which case they inherit their priority from the # hierarchy.#log4j.rootCategory=ERROR,A1 # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=ERROR,A1 # A1 is set to be a ConsoleAppender. #log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=C:/GBase/NsLog4j_debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout# Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n# A1 is set to be a LF5Appender which outputs to a swing # logging console.#log4j.appender.A1=org.apache.log4j.lf5.LF5Appender #log4j.appender.A1.MaxNumberOfRecords=1000
不会报错的,它会采用其他log工具,
只有引入log4j.jar,它才采用log4j把你的log4j.properties贴出来吧
# For the general syntax of property based configuration files see the
# documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is
# specified, the root category assumes the default priority for root
# which is DEBUG in log4j. The root category is the only category that
# has a default priority. All other categories need not be assigned a
# priority in which case they inherit their priority from the
# hierarchy.#log4j.rootCategory=ERROR,A1
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR,A1
# A1 is set to be a ConsoleAppender.
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=C:/GBase/NsLog4j_debug.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n# A1 is set to be a LF5Appender which outputs to a swing
# logging console.#log4j.appender.A1=org.apache.log4j.lf5.LF5Appender
#log4j.appender.A1.MaxNumberOfRecords=1000
# For the general syntax of property based configuration files see the
# documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is
# specified, the root category assumes the default priority for root
# which is DEBUG in log4j. The root category is the only category that
# has a default priority. All other categories need not be assigned a
# priority in which case they inherit their priority from the
# hierarchy.#log4j.rootCategory=ERROR,A1
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR,A1
# A1 is set to be a ConsoleAppender.
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=C:/GBase/NsLog4j_debug.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n# A1 is set to be a LF5Appender which outputs to a swing
# logging console.#log4j.appender.A1=org.apache.log4j.lf5.LF5Appender
#log4j.appender.A1.MaxNumberOfRecords=1000
log4j.logger.eg=error
log4j.logger.net.sf.hibernate=error
log4j.logger.net.sf.hibernate.type=error
log4j.logger.net.sf.hibernate.connection=error
log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=error
2003-09-11 10:30:31,338 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.error.password.mismatch
2003-09-11 10:30:31,338 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.errors.footer
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.subscription.title.edit
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.mainMenu.heading
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.prompt.password
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.error.bulletin
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - Saving message key '.button.save
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - getMessage(zh_CN,errors.suffix)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh_CN)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale()
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - getMessage(zh_CN,errors.header)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh_CN)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - getMessage(zh_CN,role.notfound)
2003-09-11 10:30:31,348 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh_CN)
2003-09-11 10:30:31,358 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh)
2003-09-11 10:30:31,358 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - getMessage(zh_CN,errors.footer)
2003-09-11 10:30:31,358 [Thread-15] DEBUG org.apache.struts.util.PropertyMessage
Resources - loadLocale(zh_CN)
log4j.logger.org.apache.struts=error
这个包,和相关资料,有么?
指教。
打扰。