{"id":13846430,"url":"https://github.com/googleapis/java-logging","last_synced_at":"2026-01-16T17:16:02.755Z","repository":{"id":37589904,"uuid":"203461472","full_name":"googleapis/java-logging","owner":"googleapis","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-09T02:29:47.000Z","size":7333,"stargazers_count":46,"open_issues_count":36,"forks_count":39,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-05-09T03:34:39.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleapis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-20T22:07:30.000Z","updated_at":"2025-05-06T17:38:15.000Z","dependencies_parsed_at":"2023-02-14T00:00:31.546Z","dependency_job_id":"43307eda-fc15-42bd-833c-985f7e0b71ae","html_url":"https://github.com/googleapis/java-logging","commit_stats":null,"previous_names":[],"tags_count":218,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fjava-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fjava-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fjava-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fjava-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleapis","download_url":"https://codeload.github.com/googleapis/java-logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394724,"owners_count":22063984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T18:00:33.676Z","updated_at":"2026-01-16T17:16:02.748Z","avatar_url":"https://github.com/googleapis.png","language":"Java","funding_links":[],"categories":["Google Cloud Logging","日志库"],"sub_categories":["Client libraries"],"readme":"# Google Cloud Logging Client for Java\n\nJava idiomatic client for [Cloud Logging][product-docs].\n\n[![Maven][maven-version-image]][maven-version-link]\n![Stability][stability-image]\n\n- [Product Documentation][product-docs]\n- [Client Library Documentation][javadocs]\n\n\n## Quickstart\n\nIf you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:\n\n```xml\n\u003cdependencyManagement\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n      \u003cartifactId\u003elibraries-bom\u003c/artifactId\u003e\n      \u003cversion\u003e26.55.0\u003c/version\u003e\n      \u003ctype\u003epom\u003c/type\u003e\n      \u003cscope\u003eimport\u003c/scope\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n    \u003cartifactId\u003egoogle-cloud-logging\u003c/artifactId\u003e\n  \u003c/dependency\u003e\n\n\u003c/dependencies\u003e\n\n```\n\nIf you are using Maven without the BOM, add this to your dependencies:\n\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n  \u003cartifactId\u003egoogle-cloud-logging\u003c/artifactId\u003e\n  \u003cversion\u003e3.21.3\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\nIf you are using Gradle 5.x or later, add this to your dependencies:\n\n```Groovy\nimplementation platform('com.google.cloud:libraries-bom:26.74.0-rc2')\n\nimplementation 'com.google.cloud:google-cloud-logging'\n```\nIf you are using Gradle without BOM, add this to your dependencies:\n\n```Groovy\nimplementation 'com.google.cloud:google-cloud-logging:3.23.10'\n```\n\nIf you are using SBT, add this to your dependencies:\n\n```Scala\nlibraryDependencies += \"com.google.cloud\" % \"google-cloud-logging\" % \"3.23.10\"\n```\n\n## Authentication\n\nSee the [Authentication][authentication] section in the base directory's README.\n\n## Authorization\n\nThe client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud Logging APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud Logging API calls.\n\n## Getting Started\n\n### Prerequisites\n\nYou will need a [Google Cloud Platform Console][developer-console] project with the Cloud Logging [API enabled][enable-api].\nYou will need to [enable billing][enable-billing] to use Google Cloud Logging.\n[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by\n[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:\n`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.\n\n### Installation and setup\n\nYou'll need to obtain the `google-cloud-logging` library.  See the [Quickstart](#quickstart) section\nto add `google-cloud-logging` as a dependency in your code.\n\n## About Cloud Logging\n\n\n[Cloud Logging][product-docs] allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud and Amazon Web Services. Using the BindPlane service, you can also collect this data from over 150 common application components, on-premises systems, and hybrid cloud systems. BindPlane is included with your Google Cloud project at no additional cost.\n\nSee the [Cloud Logging client library docs][javadocs] to learn how to\nuse this Cloud Logging Client Library.\n\n\n#### Creating an authorized service object\n\nTo make requests to Cloud Logging, you must create a service object with valid credentials.\nYou can then make API calls by calling methods on the Logging service object. \nYou can obtain credentials by using [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials).\nOr you can use a [Service Account](https://cloud.google.com/iam/docs/service-accounts) which is a recommended way to obtain credentials.\nThe credentials can be automatically inferred from your [environment](https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable).\nThen you only need the following code to create your service object:\n\n```java\nimport com.google.cloud.logging.Logging;\nimport com.google.cloud.logging.LoggingOptions;\n\nLoggingOptions options = LoggingOptions.getDefaultInstance();\ntry(Logging logging = options.getService()) {\n  // use logging here\n}\n```\n\nFor other options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page.\nThe service object should be granted permissions to make API calls.\nEach API call describes the permissions under Authorized Scopes section.\nSee [Logging API](https://cloud.google.com/logging/docs/reference/v2/rest) to find the required list of permissions or consult with [Access control guide](https://cloud.google.com/logging/docs/access-control) for predefined IAM roles that can be granted to the Logging service object.\n\n#### Creating a metric\nWith Logging you can create logs-based metrics. Logs-based metrics allow to keep track of the number\nof log messages associated to specific events. Add the following imports at the top of your file:\n\n```java\nimport com.google.cloud.logging.Metric;\nimport com.google.cloud.logging.MetricInfo;\n```\n\nThen, to create the metric, use the following code:\n\n```java\nMetricInfo metricInfo = MetricInfo.newBuilder(\"test-metric\", \"severity \u003e= ERROR\")\n    .setDescription(\"Log entries with severity higher or equal to ERROR\")\n    .build();\nlogging.create(metricInfo);\n```\n\n#### Writing log entries\nFor an interactive tutorial click\n\n[![Guide Me](_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-java)\n\nWith Logging you can also write custom log entries. Add the following imports at the top of your\nfile:\n\n```java\nimport com.google.cloud.MonitoredResource;\nimport com.google.cloud.logging.LogEntry;\nimport com.google.cloud.logging.Logging;\nimport com.google.cloud.logging.Payload.StringPayload;\n\nimport java.util.Collections;\n```\n\nThen, to write the log entries, use the following code:\n\n```java\nLogEntry firstEntry = LogEntry.newBuilder(StringPayload.of(\"message\"))\n    .setLogName(\"test-log\")\n    .setResource(MonitoredResource.newBuilder(\"global\")\n        .addLabel(\"project_id\", options.getProjectId())\n        .build())\n    .build();\nlogging.write(Collections.singleton(firstEntry));\n```\n\nThe library supports writing log entries synchronously and asynchronously.\nIn the synchronous mode each call to `write()` method results in a consequent call to Logging API to write a log entry.\nIn the asynchronous mode the call(s) to Logging API takes place asynchronously and few calls to `write()` method may be batched together to compose a single call to Logging API.\nThe default mode of writing is asynchronous.\nIt can be configured in the `java.util.logging` handler [configuration file](https://cloud.google.com/logging/docs/setup/java#javautillogging_configuration):\n\n```\ncom.google.cloud.logging.LoggingHandler.synchronicity=SYNC\n```\n\nor in the code after initiating an instance of `Logging` by calling:\n\n```java\nlogging.setWriteSynchronicity(Synchronicity.SYNC);\n```\n\nNOTE:\n\u003e Writing log entries asynchronously in some Google Cloud managed environments (e.g. Cloud Functions)\n\u003e may lead to unexpected results such as absense of expected log entries or abnormal program execution.\n\u003e To avoid these unexpected results, it is recommended to use synchronous mode.\n\n#### Controlling the batching settings\nAs mentioned before, in the asynchronous mode the call(s) to Logging API takes place asynchronously and few calls to `write()` \nmethod may be batched together to compose a single call to Logging API. In order to control the batching settings, the `LoggingOptions`\nis enhanced with `BatchingSettings` which can be set as shown in example below:\n\n```java\nimport com.google.api.gax.batching.BatchingSettings;\nimport com.google.api.gax.batching.FlowControlSettings;\nimport com.google.api.gax.batching.FlowController;\n\nLoggingOptions actual =\n    LoggingOptions.newBuilder()\n        .setBatchingSettings(\n            BatchingSettings.newBuilder()\n                .setIsEnabled(true)\n                .setElementCountThreshold(1000L)\n                .setRequestByteThreshold(1048576L)\n                .setDelayThreshold(Duration.ofMillis(50L))\n                .setFlowControlSettings(\n                    FlowControlSettings.newBuilder()\n                        .setMaxOutstandingElementCount(100000L)\n                        .setMaxOutstandingRequestBytes(10485760L)\n                        .setLimitExceededBehavior(\n                            FlowController.LimitExceededBehavior.ThrowException)\n                        .build())\n                .build())\n        .setProjectId('Your project ID')\n        .build();  \n```\n\nYou can find more information about batching parameters see [BatchingSettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.batching.BatchingSettings).\n\n#### Listing log entries\n\nWith Logging you can also list log entries that have been previously written. Add the following\nimports at the top of your file:\n\n```java\nimport com.google.api.gax.paging.Page;\nimport com.google.cloud.logging.LogEntry;\nimport com.google.cloud.logging.Logging.EntryListOption;\n```\n\nThen, to list the log entries, use the following code:\n\n``` java\nPage\u003cLogEntry\u003e entries = logging.listLogEntries(\n    EntryListOption.filter(\"logName=projects/\" + options.getProjectId() + \"/logs/test-log\"));\nwhile (entries != null) {\n  for (LogEntry logEntry : entries.iterateAll()) {\n    System.out.println(logEntry);\n  }\n  entries = entries.getNextPage();\n}\n```\n#### Add a Cloud Logging handler to a logger\n\nYou can also register a `LoggingHandler` to a `java.util.logging.Logger` that publishes log entries\nto Cloud Logging. Given the following logger:\n\n```java\nprivate final static Logger LOGGER = Logger.getLogger(MyClass.class.getName());\n```\n\nYou can register a `LoggingHandler` with the code:\n\n```java\nLoggingHandler.addHandler(LOGGER, new LoggingHandler());\n```\n\nAfter that, logs generated using `LOGGER` will be also directed to Cloud Logging.\n\nNotice that you can also register a `LoggingHandler` via the `logging.properties` configuration\nfile. Adding, for instance, the following line:\n\n```\ncom.google.cloud.examples.logging.snippets.AddLoggingHandler.handlers=com.google.cloud.logging.LoggingHandler\n```\n\n#### Alternative way to ingest logs in Google Cloud managed environments\n\nIf you use Java logger with the Cloud Logging Handler, you can configure the handler to output logs to `stdout` using\nthe [structured logging Json format](https://cloud.google.com/logging/docs/structured-logging#special-payload-fields).\nTo do this, add `com.google.cloud.logging.LoggingHandler.redirectToStdout=true` to the logger configuration file.\nYou can use this configuration when running applications in Google Cloud managed environments such as AppEngine, Cloud Run,\nCloud Function or GKE. The logger agent installed on these environments can capture STDOUT and ingest it into Cloud Logging.\nThe agent can parse structured logs printed to STDOUT and capture additional log metadata beside the log payload.\nThe parsed information includes severity, source location, user labels, http request and tracing information.\n\n#### Auto-population of log entrys' metadata\n\nLogEntry object metadata information such as [monitored resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource), \n[Http request](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#HttpRequest) or \n[source location](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogEntrySourceLocation)\nare automatically populated with information that the library retrieves from the execution context.\nThe library populates only empty (set to `null`) LogEntry fields.\nThis behavior in the `Logging` instance can be opted out via `LoggingOptions`.\nCall `LoggingOptions.Builder.setAutoPopulateMetadata(false)` to configure logging options to opt-out the metadata auto-population.\nCloud Logging handler can be configured to opt-out automatic population of the metadata using the logger configuration.\nTo disable the metadata auto-population add `com.google.cloud.logging.LoggingHandler.autoPopulateMetadata=false`\nto the logger configuration file.\n\nThe auto-population logic populates source location _only_ for log entries with `Severity.DEBUG` severity.\nThe execution context of the Http request and tracing information is maintained by `ContextHandler` class.\nThe context is managed in the scope of the thread.\nIf you do not use thread pools for multi-threading the `ContextHandler` can be configured to propagate the context\nto the scope of the child threads.\nTo enable this add `com.google.cloud.logging.ContextHandler.useInheritedContext=true` to the logger configuration file.\nThe library provides two methods to update the context:\n\n* Manually set the context. You can use the following methods of the `Context.Builder` to set the context information.\nUse the method `setRequest()` to setup the `HttpRequest` instance or `setRequestUrl()`, `setRequestMethod()`,\n`setReferer() `, `setRemoteIp()` and `setServerIp()` to setup the fields of the `HttpRequest`.\nThe trace and span Ids can be set directly using `setTraceId()` and `setSpanId()` respectively.\nAlternatively it can be parsed from the W3C tracing context header using `loadW3CTraceParentContext()` or\nfrom the Google Cloud tracing context header using `loadCloudTraceContext()`.\n\n    ```java\n    Context context = Context.newBuilder().setHttpRequest(request).setTrace(traceId).setSpanId(spanId).build();\n    (new ContextHandler()).setCurrentContext(context);\n    ```\n\n* Using [servlet initializer](https://github.com/googleapis/java-logging-servlet-initializer).\nIf your application uses a Web server based on Jakarta servlets (e.g. Jetty or Tomcat), you can add the servlet initializer\npackage to your WAR. The package implements a service provider interface (SPI) for\n[javax.servlet.ServletContainerInitializer](https://docs.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html)\nand filters all servlet requests to automatically capture the execution context of the servlet request and store it using\n`ContextHandler` class. The stored `Context` class instances are used to populate Http request and tracing information.\nIf you use Maven, to use the servlet initializer add the following dependency to your BOM:\n\n    ```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n      \u003cartifactId\u003egoogle-cloud-logging-servlet-initializer\u003c/artifactId\u003e\n    \u003c/dependency\u003e      \n    ```\n#### Population of Trace/Span ID fields in a LogEntry\nCloud Logging libraries use [trace fields within LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace) to capture trace contexts, which enables the [correlation of logs and traces](https://cloud.google.com/logging/docs/view/correlate-logs), and distributed tracing troubleshooting. \nThese tracing fields, including [trace](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace), [spanId](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.span_id), and [traceSampled](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace_sampled), define the trace context for a `LogEntry`.\n\nTracing information set manually takes precedence over information set by the following methods:\n\n* Auto-populate Trace/Span ID from OpenTelemetry Context\nIf you are using OpenTelemetry and there is an active span in the OpenTelemetry Context, the `trace`, `span_id`, and `trace_sampled` fields in the log entry are populated from the active span. More information about OpenTelemetry can be found [here](https://opentelemetry.io/docs/languages/java/).\n\n* Use the [servlet initializer](https://github.com/googleapis/java-logging-servlet-initializer) to Populate Trace/Span ID from HTTP Headers\nIf trace/span Id are not manually set or auto-populated from OpenTelemetry context, you can use the [servlet initializer](https://github.com/googleapis/java-logging-servlet-initializer) to populate trace/span Id from HTTP headers.\nThis package filters all servlet requests to automatically capture the execution context of the servlet request and stores it by using ContextHandler class. Http request and trace/span Id information are populated from the stored Context class instances.  \nUsing this method, trace/span Id can be automatically populated from either the [W3C Traceparent](https://www.w3.org/TR/trace-context) or [X-Cloud-Trace-Context](https://cloud.google.com/trace/docs/trace-context#legacy-http-header) headers.\n\n\n\n\n## Samples\n\nSamples are in the [`samples/`](https://github.com/googleapis/java-logging/tree/main/samples) directory.\n\n| Sample                      | Source Code                       | Try it |\n| --------------------------- | --------------------------------- | ------ |\n| Native Image Logging Sample | [source code](https://github.com/googleapis/java-logging/blob/main/samples/native-image-sample/src/main/java/com/example/logging/NativeImageLoggingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/native-image-sample/src/main/java/com/example/logging/NativeImageLoggingSample.java) |\n| Get Sink Metadata | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/GetSinkMetadata.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/GetSinkMetadata.java) |\n| List Log Entries | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/ListLogEntries.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/ListLogEntries.java) |\n| List Logs | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/ListLogs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/ListLogs.java) |\n| Log Entry Write Http Request | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java) |\n| Quickstart Sample | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/QuickstartSample.java) |\n| Tail Log Entries | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/TailLogEntries.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/TailLogEntries.java) |\n| Write Log Entry | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/WriteLogEntry.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/WriteLogEntry.java) |\n| Quickstart | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/jul/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/jul/Quickstart.java) |\n| Example Enhancer | [source code](https://github.com/googleapis/java-logging/blob/main/samples/snippets/src/main/java/com/example/logging/jul/enhancers/ExampleEnhancer.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging\u0026page=editor\u0026open_in_editor=samples/snippets/src/main/java/com/example/logging/jul/enhancers/ExampleEnhancer.java) |\n\n\n\n## Troubleshooting\n\nTo get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].\n\n## Transport\n\nCloud Logging uses gRPC for the transport layer.\n\n## Supported Java Versions\n\nJava 8 or above is required for using this client.\n\nGoogle's Java client libraries,\n[Google Cloud Client Libraries][cloudlibs]\nand\n[Google Cloud API Libraries][apilibs],\nfollow the\n[Oracle Java SE support roadmap][oracle]\n(see the Oracle Java SE Product Releases section).\n\n### For new development\n\nIn general, new feature development occurs with support for the lowest Java\nLTS version covered by  Oracle's Premier Support (which typically lasts 5 years\nfrom initial General Availability). If the minimum required JVM for a given\nlibrary is changed, it is accompanied by a [semver][semver] major release.\n\nJava 11 and (in September 2021) Java 17 are the best choices for new\ndevelopment.\n\n### Keeping production systems current\n\nGoogle tests its client libraries with all current LTS versions covered by\nOracle's Extended Support (which typically lasts 8 years from initial\nGeneral Availability).\n\n#### Legacy support\n\nGoogle's client libraries support legacy versions of Java runtimes with long\nterm stable libraries that don't receive feature updates on a best efforts basis\nas it may not be possible to backport all patches.\n\nGoogle provides updates on a best efforts basis to apps that continue to use\nJava 7, though apps might need to upgrade to current versions of the library\nthat supports their JVM.\n\n#### Where to find specific information\n\nThe latest versions and the supported Java versions are identified on\nthe individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`\nand on [google-cloud-java][g-c-j].\n\n## Versioning\n\n\nThis library follows [Semantic Versioning](http://semver.org/).\n\n\n\n## Contributing\n\n\nContributions to this library are always welcome and highly encouraged.\n\nSee [CONTRIBUTING][contributing] for more information how to get started.\n\nPlease note that this project is released with a Contributor Code of Conduct. By participating in\nthis project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more\ninformation.\n\n\n## License\n\nApache 2.0 - See [LICENSE][license] for more information.\n\nJava is a registered trademark of Oracle and/or its affiliates.\n\n[product-docs]: https://cloud.google.com/logging/docs\n[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-logging/latest/history\n[stability-image]: https://img.shields.io/badge/stability-stable-green\n[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-logging.svg\n[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-logging/3.23.10\n[authentication]: https://github.com/googleapis/google-cloud-java#authentication\n[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes\n[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles\n[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy\n[developer-console]: https://console.developers.google.com/\n[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects\n[cloud-cli]: https://cloud.google.com/cli\n[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md\n[contributing]: https://github.com/googleapis/java-logging/blob/main/CONTRIBUTING.md\n[code-of-conduct]: https://github.com/googleapis/java-logging/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct\n[license]: https://github.com/googleapis/java-logging/blob/main/LICENSE\n[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing\n[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com\n[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM\n[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png\n\n[semver]: https://semver.org/\n[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained\n[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries\n[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html\n[g-c-j]: http://github.com/googleapis/google-cloud-java\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fjava-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleapis%2Fjava-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fjava-logging/lists"}