log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.

 log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: log/log.txt (系统找不到指定的路径。)
 at java.io.FileOutputStream.openAppend(Native Method)
 at java.io.FileOutputStream.(FileOutputStream.java:177)
 at java.io.FileOutputStream.(FileOutputStream.java:102)
 at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
 at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:156)
 at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
 at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:248)
 at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:124)
 at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:88)
 at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:644)
 at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:602)
 at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:499)
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:405)
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:306)
 at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:314)
 at com.zte.gui.MainFrame.initialize(MainFrame.java:296)
 at com.zte.gui.MainFrame.startMain(MainFrame.java:227)
 at com.zte.gui.LanguageDialog.jbutOk_actionPerformed(LanguageDialog.java:241)
 at com.zte.gui.LanguageDialog.access$0(LanguageDialog.java:224)
 at com.zte.gui.LanguageDialog$3.actionPerformed(LanguageDialog.java:150)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
 at java.awt.Component.processMouseEvent(Component.java:5100)
 at java.awt.Component.processEvent(Component.java:4897)
 at java.awt.Container.processEvent(Container.java:1569)
 at java.awt.Component.dispatchEventImpl(Component.java:3615)
 at java.awt.Container.dispatchEventImpl(Container.java:1627)
 at java.awt.Component.dispatchEvent(Component.java:3477)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
 at java.awt.Container.dispatchEventImpl(Container.java:1613)
 at java.awt.Window.dispatchEventImpl(Window.java:1606)
 at java.awt.Component.dispatchEvent(Component.java:3477)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

 

 

原因  log 文件夹应放在与src的同级等地位目录下

你可能感兴趣的:(log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.)