Skip to content

Instantly share code, notes, and snippets.

LocalOutputPipeConfig config = new LocalOutputPipeConfig.Builder().url("http://localhost:9200").env("local").build();
TimberLogger.bootstrap(new LocalOutputPipe(config));
@TimberLog(name = "method_to_log")
public static void methodToLog(){
doSomething()
}
TimberLogger.exit();
<dependency>
<groupId>com.datorama</groupId>
<artifactId>timbermill-client</artifactId>
<version>2.0.0</version>
</dependency>
@TimberLog(name = "etl_invocation")
public boolean runEtl(String userId, String outputDir) {
TimberLogger.logContext("userId", userId);
String timbermillId = TimberLogger.getCurrentTaskId();
List<String> result = callQueryService(timbermillId);
boolean isSuccess = callTransformationService(timbermillId, result, outputDir);
return isSuccess;
}
@TimberLog(name = "etl_invocation")
public boolean runEtl(String userId, String outputDir) {
TimberLogger.logContext("userId", userId);
String timbermillId = TimberLogger.getCurrentTaskId();
List<String> result = callQueryService(timbermillId);
boolean isSuccess = callTransformationService(timbermillId, result, outputDir);
return isSuccess;
}
@TimberLog(name = "etl_invocation")
public boolean runEtl(String userId, String outputDir) {
TimberLogger.logContext("userId", userId);
String timbermillId = TimberLogger.getCurrentTaskId();
List<String> result = callQueryService(timbermillId);
boolean isSuccess = callTransformationService(timbermillId, result, outputDir);
return isSuccess;
}
public List<String> query(String query, String timbermillParentId) throws InterruptedException {
String id = TimberLogger.start("query", timbermillParentId, LogParams.create().text("sql", query));
try {
authorized(id);
List<String> list = runSql(query);
TimberLogger.success();
return list;
} catch (Throwable t){
public List<String> query(String query, String timbermillParentId) throws InterruptedException {
String id = TimberLogger.start("query", timbermillParentId, LogParams.create().text("sql", query));
try {
authorized(id);
List<String> list = runSql(query);
TimberLogger.success();
return list;
} catch (Throwable t){