bonjour à tous,
j'utilise log4j 1.2.9 pour le logging pour mon applet avec eclispe 3.4 ganymade;
mon probleme est quand je lance mon applet j'ai l'erreur :
1 2 3 4 5 6 7 8 9 10 11
| log4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (Le fichier spécifié est introuvable)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:297)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315)
at fr.billetel.impression.thprinter.AppletCommCPrinter.init(AppletCommCPrinter.java:85)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
log4j:ERROR Ignoring configuration file [log4j.properties]. |
le fichier log4j.properties est bien dans la racine du projet, j'ai plusieurs packages,
dans mon applet j'ai mis ça dans init
PropertyConfigurator.configure("log4j.properties");
2eme question :
est-ce possible d'evite :
private static final Logger logger = Logger.getLogger(maClass.class);
et d'appeler dans tous mes classes directement :
Logger.getLogger(maClasse.class).debug("mon message.");
merci
Partager