Skip to content

Commit

Permalink
Remove LoggerConfig from open-source (replaced by JdkLoggerConfig int…
Browse files Browse the repository at this point in the history
…ernally and normal JDK Logger config externally).

RELNOTES=Removed `JdkLoggerConfig` (#142).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=309833791
  • Loading branch information
hagbard authored and cpovirk committed May 26, 2020
1 parent 01b79af commit 62d0db6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 330 deletions.
22 changes: 0 additions & 22 deletions api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ STACK_SRCS = [
"src/main/java/com/google/common/flogger/StackSize.java",
]

CONFIG_SRCS = ["src/main/java/com/google/common/flogger/LoggerConfig.java"]

LOG_SITE_SRCS = [
"src/main/java/com/google/common/flogger/LogSite.java",
"src/main/java/com/google/common/flogger/LogSiteKey.java",
Expand All @@ -59,7 +57,6 @@ java_library(
LOG_SITE_SRCS +
LOG_SITE_HELPER_SRCS +
STACK_SRCS +
CONFIG_SRCS +
SYSTEM_BACKEND_SRCS,
),
javacopts = ["-source 1.6 -target 1.6"],
Expand Down Expand Up @@ -101,8 +98,6 @@ pom_file(
":reflection_utils",
":stack",
":tags",
# :config should be here, but that causes a circular reference to :api. Thankfully, :config
# has no deps itself
],
)

Expand All @@ -112,7 +107,6 @@ jarjar_library(
":api",
":checks",
":context",
":config",
":lazy_args",
":log_site",
":log_sites",
Expand All @@ -128,7 +122,6 @@ jarjar_library(
jars = [
":libapi-src.jar",
":libchecks-src.jar",
":libconfig-src.jar",
":libcontext-src.jar",
":liblazy_args-src.jar",
":liblog_site-src.jar",
Expand Down Expand Up @@ -205,20 +198,6 @@ java_library(
],
)

# A separate library for exposing just the 'LoggerConfig' classes, since these are
# support classes which can be imported and used freely in general code.
java_library(
name = "config",
srcs = CONFIG_SRCS,
javacopts = ["-source 1.6 -target 1.6"],
deps = [
":api",
":checks",
"@google_bazel_common//third_party/java/checker_framework_annotations",
"@google_bazel_common//third_party/java/error_prone:annotations",
],
)

# A separate library for exposing just the 'Stack' classes. This is exported as
# part of the core library.
java_library(
Expand Down Expand Up @@ -369,7 +348,6 @@ gen_java_tests(
),
deps = [
":api",
":config",
":context",
":log_sites",
":system_backend",
Expand Down
215 changes: 0 additions & 215 deletions api/src/main/java/com/google/common/flogger/LoggerConfig.java

This file was deleted.

83 changes: 0 additions & 83 deletions api/src/test/java/com/google/common/flogger/LoggerConfigTest.java

This file was deleted.

1 change: 0 additions & 1 deletion google/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ gen_java_tests(
":flogger",
"@google_bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/guava:testlib",
"//api:config",
"//api:testing",
"@google_bazel_common//third_party/java/junit",
"@google_bazel_common//third_party/java/truth",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,6 @@ public void testWithMethod_mixed() {
assertingHandler.assertOnlyLog().contains("flags=42 point.x=17 point.y=29 flags=23");
}

@Test
public void testLoggerConfig() {
LoggerConfig.of(logger).setLevel(Level.WARNING);
logger.atInfo().log("Hello First World");
LoggerConfig.of(logger).setLevel(Level.INFO);
logger.atInfo().log("Hello Second World");
assertingHandler.assertOnlyLog().contains("Hello Second World");
}

// Ensure that forEnclosingClass() creates a logger with the expected name, either by
// stack analysis or compile-time injection.
@Test
Expand Down

0 comments on commit 62d0db6

Please sign in to comment.