facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

BUCK missing logs from pre-test #2551

Open JigarJoshi opened 3 years ago

JigarJoshi commented 3 years ago

I have a Java project with a test similar to this

import org.junit.Test;

public class FooTest {
  static {
    System.out.println("line1");
    System.err.println("line2");
  }

  @Test
  public void test1(){
    // some test
    System.out.println("line3");
    System.err.println("line4");
    throw new RuntimeException("Fail it");
  }
}

Is there anyway to capture this line1 & line2. Sometime it fails in ClassRule and we want to be able to surface the log messages to developers.

v-jizhang commented 3 years ago

You can find in buck logs, ./buck-out/log/buck-0.log for example.