java - Get org.springframework to stop polluting my logs -


i using payara 4.1 , netbeans 8.1.

when run application, these 4 lines among first logged:

 #!## logmanagerservice.postconstruct : rootfolder=/opt/payara41/glassfish  #!## logmanagerservice.postconstruct : templatedir=/opt/payara41/glassfish/lib/templates  #!## logmanagerservice.postconstruct : src=/opt/payara41/glassfish/lib/templates/logging.properties  #!## logmanagerservice.postconstruct : dest=/opt/payara41/glassfish/domains/domain1/config/logging.properties 

i added line org.springframework=warning @ end of last logging.properties file given above, , restarted server. didn't seem have effect. when open asadmin shell /opt/payara41/bin/asadmin , run list-log-attributes, here get:

asadmin> list-log-attributes com.sun.enterprise.server.logging.gffilehandler.excludefields   <> com.sun.enterprise.server.logging.gffilehandler.file    <${com.sun.aas.instanceroot}/logs/server.log> com.sun.enterprise.server.logging.gffilehandler.flushfrequency  <1> com.sun.enterprise.server.logging.gffilehandler.formatter   <com.sun.enterprise.server.logging.odllogformatter> com.sun.enterprise.server.logging.gffilehandler.logtoconsole    <false> com.sun.enterprise.server.logging.gffilehandler.maxhistoryfiles <0> com.sun.enterprise.server.logging.gffilehandler.multilinemode   <true> com.sun.enterprise.server.logging.gffilehandler.retainerrorsstasticsforhours    <0> com.sun.enterprise.server.logging.gffilehandler.rotationlimitinbytes    <2000000> com.sun.enterprise.server.logging.gffilehandler.rotationondatechange    <false> com.sun.enterprise.server.logging.gffilehandler.rotationtimelimitinminutes  <0> com.sun.enterprise.server.logging.sysloghandler.usesystemlogging    <false> handlerservices <com.sun.enterprise.server.logging.gffilehandler,com.sun.enterprise.server.logging.sysloghandler> handlers    <java.util.logging.consolehandler> java.util.logging.consolehandler.formatter  <com.sun.enterprise.server.logging.uniformlogformatter> java.util.logging.filehandler.count <1> java.util.logging.filehandler.formatter <java.util.logging.xmlformatter> java.util.logging.filehandler.limit <50000> java.util.logging.filehandler.pattern   <%h/java%u.log> log4j.logger.org.hibernate.validator.util.version   <warn> org.springframework <warning> command list-log-attributes executed successfully. 

i have tried suggestions given in this question didn't work. i'm stumped. :( not want see info logging lines printed spring framework.

=== edit ===

here in log4j.properties (copied so):

# define root logger appender file log4j.rootlogger = debug, stdout  # define file appender log4j.appender.stdout=org.apache.log4j.consoleappender # set name of logs destination log4j.appender.stdout.target=system.out  # set immediate flush true (default) log4j.appender.stdout.immediateflush=true  # set threshold debug mode log4j.appender.stdout.threshold=debug  # set append false, overwrite log4j.appender.stdout.append=false  # define layout appender log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern=%d{yyyy-mm-dd}:%m%n  log4j.logger.org.springframework=warning 

here places have copied file to:

$project_dir/src/log4j.properties $project_dir/src/main/resources/meta-inf/log4j.properties $project_dir/src/main/webapp/web-inf/log4j.properties $project_dir/src/main/webapp/web-inf/classes/log4j.properties $project_dir/target/$project-1.0/web-inf/log4j.properties $project_dir/target/$project-1.0/web-inf/classes/log4j.properties $project_dir/target/$project-1.0/web-inf/classes/meta-inf/log4j.properties $project_dir/target/classes/meta-inf/log4j.properties /opt/payara41/glassfish/domains/domain1/config/log4j.properties 

in addition, have added log4j.logger.org.springframework=warning , org.springframework=warning configurations > server-config > logger settings > module log levels in payara ui. nothing working. payara's server log still has info lines spring framework.

i tried has been suggested far, no avail. ended doing pretty hacky. wrote own log handler , installed domain1/lib/ext:

package org.springsuppressor;  import java.util.logging.consolehandler; import java.util.logging.level;  public class myhandler extends consolehandler {    public myhandler() {     super();     setlevel(level.warning);   } } 

the handler above sets log level loggers warning. suppress messages spring framework, don't yet need that.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -