You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use [`ILoggingEvent`](https://logback.qos.ch/apidocs/ch/qos/logback/classic/spi/ILoggingEvent.html) to update a log entry with [`LoggingEventEnhancer`]
* Enable [auto-population](https://github.com/googleapis/java-logging#auto-population-of-log-entrys-metadata) of the `LogEntry` metadata using the `autoPopulateMetadata` configuration flag.
81
+
82
+
#### Optimize log ingestion
83
+
84
+
By default, the appender will ingest log entries asynchronously by calling Logging API.
85
+
Multiple calls may be aggregated before being sent to improve use of API quota and bandwidth.
86
+
You can set the `writeSynchronicity` configuration flag to `SYNC` if they want to ingest log entries synchronously.
87
+
Note that configuring synchronous ingestion will probably result in performance penalties to your applications.
88
+
If you plan to deploy your application in one of Google Cloud managed environments (e.g. Cloud Run, Cloud Function or App Engine),
89
+
you can leverage the support provided by the implicit logging agent and the [structured logging](https://cloud.google.com/logging/docs/structured-logging) feature.
90
+
To use it, set the `redirectToStdout` configuration flag to `true`.
91
+
This flag instructs the appender to print the log entries to `stdout` instead of ingesting them using Logging API.
92
+
The log entries are printed using the [structured logging Json format](https://cloud.google.com/logging/docs/structured-logging#special-payload-fields).
93
+
In result, the logging agent will be responsible for ingesting the logs to Logging API.
94
+
Note that using the structured logging Json format you cannot control the log name where the logs will be ingested.
95
+
The logs will be ingested into the project that hosts the environment where your application is running.
96
+
The configuration `logDestinationProjectId` will be ignored.
0 commit comments