Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-1002

SDK 3.2 Printing TRACE & DEBUG logs by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.1
    • 2.2.0
    • None
    • None
    • 1
    • Medium

    Description

      Hi, 

      While trying to update the Java SDK to 3.2.0 on the playground, I find that the logs are turned on by default in 3.2.0 vs 3.1.3

      Sample log
      [DEBUG] (cb-events) [com.couchbase.core][DnsSrvLookupDisabledEvent] DNS SRV lookup disabled (enabled on the env: true, valid host: false)
      [DEBUG] (cb-events) [com.couchbase.core][ReconfigurationCompletedEvent][7778us] Reconfiguration attempt completed. {"coreId":"0x663bf28800000001"}
      [ INFO] (cb-events) [com.couchbase.core][CoreCreatedEvent] {"clientVersion":"3.2.0","clientGitHash":"${buildNumber}","coreVersion":"2.2.0","coreGitHash":"${buildNumber}","userAgent":"couchbase-java/3.2.0 (Linux 5.10.25-linuxkit amd64; OpenJDK 64-Bit Server VM 16.0.1+9)","maxNumRequestsInRetry":32768,"ioEnvironment":

      {"nativeIoEnabled":true,"eventLoopThreadCount":3,"eventLoopGroups":["EpollEventLoopGroup"]}

      ,"ioConfig":{"captureTraffic":[],"mutationTokensEnabled":true,"networkResolution":"auto","dnsSrvEnabled":true,"tcpKeepAlivesEnabled":true,"tcpKeepAliveTimeMs":60000,"configPollIntervalMs":2500,"kvCircuitBreakerConfig":"disabled","queryCircuitBreakerConfig":"disabled","viewCircuitBreakerConfig":"disabled","searchCircuitBreakerConfig":"disabled","analyticsCircuitBreakerConfig":"disabled","managerCircuitBreakerConfig":"disabled","eventingCircuitBreakerConfig":"disabled","numKvConnections":1,"maxHttpConnections":12,"idleHttpConnectionTimeoutMs":4500,"configIdleRedialTimeoutMs":300000,"memcachedHashingStrategy":"StandardMemcachedHashingStrategy"},"compressionConfig":{"enabled":true,"minRatio":0.83,"minSize":32},"securityConfig":{"tlsEnabled":false,"nativeTlsEnabled":true,"hostnameVerificationEnabled":true,"hasTrustCertificates":false,"trustManagerFactory":null,"ciphers":[]},"timeoutConfig":{"kvMs":2500,"kvDurableMs":10000,"managementMs":75000,"queryMs":75000,"viewMs":75000,"searchMs":75000,"analyticsMs":75000,"connectMs":10000,"disconnectMs":10000,"eventingMs":75000},"loggerConfig":{"customLogger":null,"fallbackToConsole":true,"disableSlf4j":false,"loggerName":"CouchbaseLogger","diagnosticContextEnabled":false},"orphanReporterConfig":{"emitIntervalMs":10000,"sampleSize":10,"queueLength":1024,"enabled":true},"thresholdLoggingTracerConfig":{"enabled":true,"emitIntervalMs":10000,"sampleSize":10,"queueLength":1024,"kvThresholdMs":500,"queryThresholdMs":1000,"searchThresholdMs":1000,"analyticsThresholdMs":1000,"viewThresholdMs":1000},"loggingMeterConfig":{"enabled":true,"emitIntervalMs":600000},"retryStrategy":"BestEffortRetryStrategy","requestTracer":"ThresholdLoggingTracer","meter":"LoggingMeter","numRequestCallbacks":0} {"coreId":"0x663bf28800000001","seedNodes":[

      {"address":"127.0.0.1"}

      ]}
      [ INFO] (cb-events) [com.couchbase.node][NodeConnectedEvent] Node connected {"coreId":"0x663bf28800000001","managerPort":"8091","remote":"127.0.0.1"}
      [DEBUG] (cb-events) [com.couchbase.service][ServiceConnectInitiatedEvent] Starting to connect service with 1 minimum endpoints {"coreId":"0x663bf28800000001","remote":"127.0.0.1:11210","type":"KV"}
      [DEBUG] (cb-events) [com.couchbase.endpoint][EndpointStateChangedEvent] Endpoint changed state from DISCONNECTED to CONNECTING {"circuitBreaker":"DISABLED","coreId":"0x663bf28800000001","remote":"127.0.0.1:11210","type":"KV"}
      .....
      [TRACE] (cb-events) [com.couchbase.service][ServiceAddIgnoredEvent] Service not added to Node. Reason: ALREADY_ADDED {"coreId":"0x663bf28800000001","managerPort":"8091","remote":"127.0.0.1"}
      [DEBUG] (cb-events) [com.couchbase.core][ReconfigurationCompletedEvent][18ms] Reconfiguration attempt completed. {"coreId":"0x663bf28800000001"}
      [ INFO] (cb-events) [com.couchbase.core][BucketOpenedEvent][391ms] Opened bucket "travel-sample" {"coreId":"0x663bf28800000001"}
      GetResult{content=

      {"id":10,"type":"airline","name":"40-Mile Air","iata":"Q5","icao":"MLA","callsign":"MILE-AIR","country":"United States"}

      , flags=0x0, cas=0x169639cd55e40001, expiry=Optional.empty}
      After trying to disable logs in the runtime, we are still getting debug logs from the cb-events.
      javac -cp .:`cat /home/play/hello/classpath.txt` code.java
      java -cp .:`cat /home/play/hello/classpath.txt` -Droot.log.level=INFO Program

       

      Is it possible to disable these logs while running the program?

      Attachments

        Activity

          People

            daschl Michael Nitschinger
            nithish.raghunandanan Nithish Raghunandanan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty