spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 696 forks source link

Could not find an appender named [STACKDRIVER] #2668

Closed ShaimaaSabry closed 3 years ago

ShaimaaSabry commented 3 years ago

my dependency:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gcp-starter-logging</artifactId>
    <version>1.2.1.RELEASE</version>
</dependency>

my logback-spring.xml

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <!-- With 1.2 release, replace with: include resource="org/springframework/cloud/gcp/logging/logback-appender.xml" /-->
    <include resource="org/springframework/cloud/gcp/logging/logback-appender.xml" />
    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
    <include resource="org/springframework/boot/logging/logback/console-appender.xml" />

    <root level="INFO">
        <!-- If running in GCP, remove the CONSOLE appender otherwise logs will be duplicated. -->
        <!--appender-ref ref="CONSOLE"/-->
        <appender-ref ref="STACKDRIVER" />
    </root>
</configuration>

The error:

 Logback configuration error detected: 
ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [STACKDRIVER]
suztomo commented 3 years ago

Troubleshooting in https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues/517

elefeint commented 3 years ago

Closing as a duplicate.