This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean transform(String outputDir, String timbermillParentId) throws InterruptedException { | |
String id = TimberLogger.start("transform", timbermillParentId, LogParams.create().text("outputhDir", outputDir)); | |
boolean isAuthorized = authorized(id); | |
runTransformation(); | |
boolean isSuccess = persistToDisk(outputDir); | |
TimberLogger.success(); | |
return isSuccess; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<String> query(String query, String timbermillParentId) { | |
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TimberLogger.exit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void doSomething(){ | |
TimberLogger.logContext("key","context"); | |
TimberLogger.logText("key","This is a text"); | |
TimberLogger.logString("key","string"); | |
TimberLogger.logMetric("key",2); | |
TimberLogger.logInfo("This is a regular log"); | |
TimberLogger.logInfo("This is also a regular log"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@TimberLog(name = "method_to_log") | |
public static void methodToLog(){ | |
doSomething() | |
} |