Announcement Announcement Module
Collapse
No announcement yet.
Logging out MongoDB generated queries in my IDE console when running tests Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging out MongoDB generated queries in my IDE console when running tests

    I can't seem to get any debug logging out. I have a repo with a query

    @Query("{addresses: {zipCode:?0}}")
    public List<Person> findAtAddress(String zipCode);

    Here is my log4j.properties. I had to comment stuff that would overwrite what was already working. also put {{ }} to hide ip and port we are using.

    Code:
    log4j.rootLogger=info, stdout
    
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    
    # Print the date in ISO 8601 format
    log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
    
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=application.log
    
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=1
    
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    
    #log4j.logger.org.springframework.ws = debug
    log4j.logger.org.springframework.data.neo4j.repository = debug
    
    #MongoDB Logging
    #log4j.appender.stdout=org.springframework.data.document.mongodb.log4j.MongoLog4jAppender
    #log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    #log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
    log4j.appender.stdout.host = {{ipaddress}}
    log4j.appender.stdout.port = {{port}}
    log4j.appender.stdout.database = test
    log4j.appender.stdout.collectionPattern = %X{year}%X{month}
    log4j.appender.stdout.applicationId = my.application
    log4j.appender.stdout.warnOrHigherWriteConcern = FSYNC_SAFE
    
    log4j.category.org.springframework.data.document.mongodb=DEBUG
    But I don't see any logging being done
Working...
X