@@ -46,9 +46,9 @@ public static LoggerConfig enabled() {
4646 return DEFAULT_CONFIG ;
4747 }
4848
49- /** Returns a new {@link Builder } for creating a {@link LoggerConfig}. */
50- public static Builder builder () {
51- return new Builder ();
49+ /** Returns a new {@link LoggerConfigBuilder } for creating a {@link LoggerConfig}. */
50+ public static LoggerConfigBuilder builder () {
51+ return new LoggerConfigBuilder ();
5252 }
5353
5454 /**
@@ -69,65 +69,6 @@ public static ScopeConfiguratorBuilder<LoggerConfig> configuratorBuilder() {
6969
7070 LoggerConfig () {}
7171
72- /**
73- * Builder for {@link LoggerConfig}.
74- *
75- * <p>This class is internal and experimental. Its APIs are unstable and can change at any time.
76- * Its APIs (or a version of them) may be promoted to the public stable API in the future, but no
77- * guarantees are made.
78- */
79- public static final class Builder {
80- private boolean enabled = true ;
81- private int minimumSeverity = 0 ;
82- private boolean traceBased = false ;
83-
84- private Builder () {}
85-
86- /**
87- * Sets whether the logger is enabled.
88- *
89- * @param enabled whether the logger is enabled
90- * @return this builder
91- */
92- public Builder setEnabled (boolean enabled ) {
93- this .enabled = enabled ;
94- return this ;
95- }
96-
97- /**
98- * Sets the minimum severity level for log records to be processed.
99- *
100- * <p>Log records with a severity number less than this value will be dropped. Log records
101- * without a specified severity are not affected by this setting.
102- *
103- * @param minimumSeverity minimum severity level for log records to be processed
104- * @return this builder
105- */
106- public Builder setMinimumSeverity (int minimumSeverity ) {
107- this .minimumSeverity = minimumSeverity ;
108- return this ;
109- }
110-
111- /**
112- * Sets whether to only process log records from traces when the trace is sampled.
113- *
114- * <p>When enabled, log records from unsampled traces will be dropped. Log records that are not
115- * associated with a trace context are unaffected.
116- *
117- * @param traceBased whether to only process log records from traces when the trace is sampled
118- * @return this builder
119- */
120- public Builder setTraceBased (boolean traceBased ) {
121- this .traceBased = traceBased ;
122- return this ;
123- }
124-
125- /** Builds and returns a {@link LoggerConfig}. */
126- public LoggerConfig build () {
127- return new AutoValue_LoggerConfig (enabled , minimumSeverity , traceBased );
128- }
129- }
130-
13172 /** Returns {@code true} if this logger is enabled. Defaults to {@code true}. */
13273 public abstract boolean isEnabled ();
13374
0 commit comments