Coder Social home page Coder Social logo

Comments (12)

pmakani avatar pmakani commented on June 26, 2024

@CarloWakefield I faced same issue so i added console appender after that i can able to see log entries. can you try that ? if it is works for you.

<configuration>
    <appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>DEBUG</level>
        </filter>
    </appender>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    </appender>
    <root level="debug">
        <appender-ref ref="CLOUD"/>
        <appender-ref ref="STDOUT"/>
    </root>
</configuration>

from java-logging-logback.

 avatar commented on June 26, 2024

@CarloWakefield I faced same issue so i added console appender after that i can able to see log entries. can you try that ? if it is works for you.

<configuration>
    <appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>DEBUG</level>
        </filter>
    </appender>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    </appender>
    <root level="debug">
        <appender-ref ref="CLOUD"/>
        <appender-ref ref="STDOUT"/>
    </root>
</configuration>

OK, I will try it.
But should this be necessary? Shouldn't the com.google.cloud.logging.logback.LoggingAppender appender already do the logging?
And if not, why isn't this documented at https://cloud.google.com/logging/docs/setup/java#logback_appender_for?

from java-logging-logback.

lapidus79 avatar lapidus79 commented on June 26, 2024

Facing the same issue as well and confused regarding the proper setup here

from java-logging-logback.

yeroc avatar yeroc commented on June 26, 2024

Also have this same issue. In my case running a container on Cloud Run.

from java-logging-logback.

drabiger avatar drabiger commented on June 26, 2024

Same issue here.

from java-logging-logback.

nyt-hughmandeville avatar nyt-hughmandeville commented on June 26, 2024

For me, the logs are written to Stackdriver, but in an unexpected location.
I see com.google.cloud.logging.logback.LoggingAppender messages in
GKE Container -> application.log

ch.qos.logback.core.ConsoleAppender messages are in the expected location:
Kubernetes Container -> stdout

The GKE Cluster version is 1.15 so logs should be written to Kubernetes not GKE.

from java-logging-logback.

AWinterman avatar AWinterman commented on June 26, 2024

the documentation does not make clear that the log value in the logback.xml conf is what determines the gcloud logging logName. Might be good to call that out more explicitly.

from java-logging-logback.

minherz avatar minherz commented on June 26, 2024

I am deeply apologies that this issue was neglected for so long. Does anyone still experience a problem to ingest logs into Google Cloud Logging using Logback?

from java-logging-logback.

minherz avatar minherz commented on June 26, 2024

I close the issue due to lack of response. Feel free to reopen it if the describe problem is still relevant.

from java-logging-logback.

sefaYavuz avatar sefaYavuz commented on June 26, 2024

I'm facing this issue as well @minherz

from java-logging-logback.

nupur1124N avatar nupur1124N commented on June 26, 2024

I am facing same issue using 0.130.11-alpha @minherz

from java-logging-logback.

cwardgar avatar cwardgar commented on June 26, 2024

@minjerz Ditto. Version 0.130.17-alpha.

from java-logging-logback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.