Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Flushing logs slows down the application intensively (Error severity logs are flushed by default) we need a way to disable flushing #1143

@montss

Description

@montss

Environment details

  1. Java version: 11
  2. version(s): com.google.cloud:libraries-bom:26.1.3 --> com.google.cloud:google-cloud-logging-bom:3.11.5 --> com.google.cloud:google-cloud-logging:3.11.5

Steps to reproduce

Using JUL

Code example

		LoggingHandler googleHandler = new LoggingHandler();
		googleHandler.setFlushLevel(LoggingLevel.EMERGENCY);
		Logger logger = Logger.getLogger(TestClass.class.getName());
		logger.addHandler(googleHandler);

Any additional information below

Related to:-
googleapis/google-cloud-java#2796
googleapis/google-cloud-java#4254

Setting the flush level to something higher than error doesn't work.
Also setting it though logging.properties file doesn't work
com.google.cloud.logging.LoggingHandler.flushLevel=EMERGENCY

Error logs are flushed by default which causes massive slows down for that request overall
Profiling the system shows that most of the time are gone as a wall time on the flush call

We need a way to disable flushing for good.
Didn't try .setFlushLevel(Level.OFF);

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/java-logging API.logging-resiliencepriority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions