Package com.google.cloud.logging.logback

Classes

LoggingAppender

Logback appender for Google Cloud Logging.

Appender configuration in logback.xml:

    <appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender">
         <!-- Optional: filter logs at and above this level -->
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
             <level>INFO</level>
         </filter>

         <!-- Optional: defaults to "java.log" -->
         <log>application.log</log>

         <!-- Optional: defaults to "ERROR" -->
         <flushLevel>WARNING</flushLevel>

         <!-- Optional: defaults to ASYNC -->
         <writeSynchronicity>SYNC</writeSynchronicity>

         <!-- Optional: auto detects on App Engine Flex, Standard, GCE and GKE, defaults to "global". See supported resource types -->
         <resourceType></resourceType>

         <!-- Optional: defaults to the default credentials of the environment -->
         <credentialsFile>/path/to/credentials/file</credentialsFile>

         <!-- Optional: add custom labels to log entries using LoggingEnhancer classes -->
         <enhancer>com.example.enhancers.TestLoggingEnhancer</enhancer>
         <enhancer>com.example.enhancers.AnotherEnhancer</enhancer>
     </appender>
 

TraceLoggingEventEnhancer

Adds support for grouping logs by incoming http request

Interfaces

LoggingEventEnhancer

An enhancer for ILoggingEvent log entries. Used to add custom labels to the LogEntry.Builder.