2525import com .google .cloud .bigtable .admin .v2 .models .Cluster ;
2626import com .google .cloud .bigtable .admin .v2 .models .Instance ;
2727import com .google .cloud .bigtable .admin .v2 .models .UpdateAuthorizedViewRequest ;
28- import com .google .common .base .Joiner ;
29- import com .google .common .base .Preconditions ;
30- import com .google .common .base .Strings ;
3128import com .google .common .collect .ImmutableSet ;
3229import java .io .IOException ;
33- import java .nio .file .Files ;
34- import java .nio .file .Path ;
35- import java .nio .file .Paths ;
3630import java .util .ArrayList ;
3731import java .util .List ;
3832import java .util .Set ;
3933import java .util .concurrent .ExecutionException ;
40- import java .util .logging .FileHandler ;
4134import java .util .logging .Handler ;
4235import java .util .logging .Level ;
4336import java .util .logging .Logger ;
44- import java .util .logging .SimpleFormatter ;
4537import org .junit .rules .TestRule ;
4638import org .junit .runner .Description ;
4739import org .junit .runners .model .Statement ;
@@ -107,8 +99,6 @@ protected void before(Description description) throws Throwable {
10799 .that (System .getenv ())
108100 .doesNotContainKey (BIGTABLE_EMULATOR_HOST_ENV_VAR );
109101
110- configureLogging (description );
111-
112102 switch (env ) {
113103 case "emulator" :
114104 testEnv = EmulatorEnv .createBundled ();
@@ -125,33 +115,6 @@ protected void before(Description description) throws Throwable {
125115 testEnv .start ();
126116 }
127117
128- private void configureLogging (Description description ) throws IOException {
129- if (!BIGTABLE_ENABLE_VERBOSE_GRPC_LOGS ) {
130- return ;
131- }
132- Preconditions .checkState (
133- !Strings .isNullOrEmpty (BIGTABLE_GRPC_LOG_DIR ),
134- "The property "
135- + BIGTABLE_GRPC_LOG_DIR
136- + " must be set when verbose grpc logs are enabled" );
137-
138- Files .createDirectories (Paths .get (BIGTABLE_GRPC_LOG_DIR ));
139-
140- String basename =
141- Joiner .on ("-" ).useForNull ("" ).join (description .getClassName (), description .getMethodName ());
142- Path logPath = Paths .get (BIGTABLE_GRPC_LOG_DIR , basename + ".log" );
143-
144- grpcLogHandler = new FileHandler (logPath .toString ());
145- grpcLogHandler .setFormatter (new SimpleFormatter ());
146- grpcLogHandler .setLevel (Level .ALL );
147-
148- for (String grpcLoggerName : GRPC_LOGGER_NAMES ) {
149- Logger logger = Logger .getLogger (grpcLoggerName );
150- logger .setLevel (Level .ALL );
151- logger .addHandler (grpcLogHandler );
152- }
153- }
154-
155118 private void after () {
156119 try {
157120 cleanUpStale ();
0 commit comments