I am using Apache Commons Exec in a web application in JBoss 4.2.3. Whenever I call Apache Exec, it prints all the console output to the log, and this is a lot of output, and it can easily populate my logs in a production environment. How can I prevent this log from printing and show only error logs?
Hi
In the log4j.properties file for your web application, add a line that looks something like this:
log4j.logger.org.apache.commons.exec=ERROR
stdout/stderr/stdin , . , , .
executor.setStreamHandler(new PumpStreamHandler(null, null, null));
You can disable logging at the application server level. Just add to jboss-log4j.xmlthis line:
jboss-log4j.xml
<category name="org.apache.commons.exec"> <priority value="ERROR"/> </category>
Source: https://habr.com/ru/post/1795500/More articles:any open source messenger? - c #How to manipulate .doc files - javaParent and child flags - javascriptGet server address in Java Web Start - javaSearch "Samples and Demos" for a specific JDK version - javaWhen using OleDBDataReader to select the memo field from the Access database, it returns part of the string. How can I get the whole line? - c #Telephone encryption encryption - encryptionCreating a Partial Patch File / Using TortoiseSVN - svnWhat does Configuration.AddAssembly ("") do in NHibernate? - nhibernatehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1795505/what-are-the-consequences-of-a-blanket-update-of-stored-procedures-to-include-set-nocount-on&usg=ALkJrhgkdjwX8dm0Z5qry4f84-JHddNFMQAll Articles