From c6d7d436eda6486e4340cbe400155f2d6eab9607 Mon Sep 17 00:00:00 2001 From: David Basoco Date: Wed, 9 Jun 2021 19:15:37 +0200 Subject: [PATCH] Set by default enabled to true in log4j2 appender (#244) * Set by default enabled to true in log4j2 appender Co-authored-by: Diego Veralli --- .../src/main/java/com/rollbar/log4j2/RollbarAppender.java | 2 +- .../java/com/rollbar/log4j2/RollbarAppenderIntegrationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rollbar-log4j2/src/main/java/com/rollbar/log4j2/RollbarAppender.java b/rollbar-log4j2/src/main/java/com/rollbar/log4j2/RollbarAppender.java index 257c17b2..7d434dba 100644 --- a/rollbar-log4j2/src/main/java/com/rollbar/log4j2/RollbarAppender.java +++ b/rollbar-log4j2/src/main/java/com/rollbar/log4j2/RollbarAppender.java @@ -83,7 +83,7 @@ public static RollbarAppender createAppender( @PluginAttribute("endpoint") final String endpoint, @PluginAttribute("environment") final String environment, @PluginAttribute("language") final String language, - @PluginAttribute("enabled") final boolean enabled, + @PluginAttribute(value = "enabled", defaultBoolean = true) final boolean enabled, @PluginAttribute("configProviderClassName") final String configProviderClassName, @PluginAttribute("name") @Required final String name, @PluginElement("Layout") Layout layout, diff --git a/rollbar-log4j2/src/test/java/com/rollbar/log4j2/RollbarAppenderIntegrationTest.java b/rollbar-log4j2/src/test/java/com/rollbar/log4j2/RollbarAppenderIntegrationTest.java index 0b2cfd72..90da761b 100644 --- a/rollbar-log4j2/src/test/java/com/rollbar/log4j2/RollbarAppenderIntegrationTest.java +++ b/rollbar-log4j2/src/test/java/com/rollbar/log4j2/RollbarAppenderIntegrationTest.java @@ -130,7 +130,7 @@ public static class TestConfigProvider implements ConfigProvider { @Override public Config provide(ConfigBuilder builder) { - return builder.accessToken(TEST_TOKEN).enabled(true).sender(SENDER.get()).build(); + return builder.accessToken(TEST_TOKEN).sender(SENDER.get()).build(); } } }