Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to disable mongoDB java driver logging

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 1.01k
    Comment on it

    Go to mongodb configuration file and add following lines of code.

    @Configuration
    public class SpringMongoConfig extends AbstractMongoConfiguration{
     
     static Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    
     static {
      root.setLevel(Level.INFO);
     }
     
    }

    Here class for Logger will be:

    import org.slf4j.LoggerFactory;
    import ch.qos.logback.classic.Level;
    import ch.qos.logback.classic.Logger;

     

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: