我写了一个java项目,打成jar包给别人web项目用,我自己用的log4j,别人用的slf4j,我本来相抛异常,可有的地方抛不出去,如下,有没有办法抛出去?如果不能,我这里的logger写的日志,web项目也写日志,那不是要log4j和slf4j,两个配置文件?能不能只有一个?public class Qustion {
jarLooger = ....;
public static void main(String[] args) throws IOException {
        Files.walkFileTree(Paths.get("c:\\dir1"),  
                new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
// TODO 
try {
thirdPartyMethod();
} catch (Exception e) {
// we don`t want to catch but throw,cause we need the caller to log it.
e.printStackTrace();
jarLooger.info();
}
return super.visitFile(file, attrs);

        });
}

public static void thirdPartyMethod () throws Exception{
throw new Exception("third party exception");
}
}