diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/AsyncLoggingHandler.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/AsyncLoggingHandler.java deleted file mode 100644 index 1773ef07aa55..000000000000 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/AsyncLoggingHandler.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.logging; - -import com.google.cloud.MonitoredResource; -import com.google.cloud.logging.Logging.WriteOption; - -import java.util.List; -import java.util.logging.Filter; -import java.util.logging.Formatter; -import java.util.logging.Logger; -import java.util.logging.SimpleFormatter; - -/** - * A logging handler that asynchronously outputs logs generated with - * {@link java.util.logging.Logger} to Stackdriver Logging. - * - *
Java logging levels (see {@link java.util.logging.Level}) are mapped to the following Google - * Stackdriver Logging severities: - * - *
Java Level | Stackdriver Logging Severity |
---|---|
SEVERE | ERROR |
WARNING | WARNING |
INFO | INFO |
CONFIG | INFO |
FINE | DEBUG |
FINER | DEBUG |
FINEST | DEBUG |
Original Java logging levels are added as labels (with {@code levelName} and - * {@code levelValue} keys, respectively) to the corresponding Stackdriver Logging {@link LogEntry}. - * You can read entry labels using {@link LogEntry#getLabels()}. To use logging levels that correspond - * to Stackdriver Logging severities you can use {@link LoggingLevel}. - * - *
Configuration: By default each {@code AsyncLoggingHandler} is initialized using the - * following {@code LogManager} configuration properties (that you can set in the - * {@code logging.properties} file. If properties are not defined (or have invalid values) then the - * specified default values are used. - *
To add a {@code LoggingHandler} to an existing {@link Logger} and be sure to avoid infinite - * recursion when logging, use the {@link #addHandler(Logger, LoggingHandler)} method. Alternatively - * you can add the handler via {@code logging.properties}. For example using the following line: - *
- * {@code com.example.mypackage.handlers=com.google.cloud.logging.AsyncLoggingHandler} - *- */ -public class AsyncLoggingHandler extends LoggingHandler { - - public AsyncLoggingHandler() { - super(); - } - - public AsyncLoggingHandler(String logName) { - super(logName); - } - - public AsyncLoggingHandler(String logName, LoggingOptions options) { - super(logName, options); - } - - public AsyncLoggingHandler(String logName, LoggingOptions options, MonitoredResource resource) { - super(logName, options, resource); - } - - @Override - void write(List
To add a {@code LoggingHandler} to an existing {@link Logger} and be sure to avoid infinite
@@ -106,6 +107,7 @@ public class LoggingHandler extends Handler {
private volatile Logging logging;
private Level flushLevel;
private long flushSize;
+ private Synchronicity synchronicity;
private final List