Bonjour
Voilà après une journée de recherche je n’arrive pas à résoudre mon problème !
En fait sur mon server.xml j’ai deux web App comme suite :
J’aimerai avoir un fichier de log(les logs de System.out et /ou System.err.) pour chaque application (au lieu de les avoir tous dans catalina.out)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <Host name="www.exemple.com" appBase="/var/jakarta-tomcat-.0.28/webapps/exemple" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" swallowOutput="true" > <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="app1_log." pattern="%h|%l|%u|%t|%r|%s|%b|%{User-Agent}i"|%D"/> </Host> <!—2 host --> <Host name="www3.exemple.ma" appBase="/var/jakarta-tomcat-6.0.28/webapps/infomarket" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" swallowOutput="true" > <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="app2_log." pattern="%h|%l|%u|%t|%r|%s|%b|%{User-Agent}i"|%D"/> </Host>
Avec Access log ça marche impeccable, mais avec logFile ça marche pas
J’ai essayé la configuration suivante mais les fichiers n’ont pas été créés
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <Host name="www.exemple.com" appBase="/var/jakarta-tomcat-.0.28/webapps/exemple" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" swallowOutput="true" > <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/> </Host> <!2 host --> <Host name="www3.exemple.ma" appBase="/var/jakarta-tomcat-6.0.28/webapps/infomarket" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" swallowOutput="true" > <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/> </Host>
Vous avez une idée ?
Merci d’avance.
Partager