Package com.google.cloud.logging.logback (0.129.10-alpha)

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: defaults to true -->
         <autoPopulateMetadata>false</autoPopulateMetadata>

         <!-- Optional: defaults to false -->
         <redirectToStdout>true</redirectToStdout>

         <!-- 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: defaults to the project id obtained during authentication process. Project id is also used to construct resource name of the log entries -->
         <logDestinationProjectId>String</logDestinationProjectId>

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

         <!-- Optional: specifies if a batch's valid entries should be written even if some other entry failed due to an error. Defaults to true -->
         <partialSuccess>true</partialSuccess>
     </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.