Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Medium - Android/Java Interfaces like a Boss! - Markers (Usage)
public class OpenFileHelper {
private final Logger myLogger;
public OpenFileHelper() {
// logs strategies
SystemsLogger systemsLogger = new SystemsLoggerImpl();
LogCatLogger logCatLogger = new LogCatLoggerImpl("OpenFileHelper");
// log manager
myLogger = new LoggerDispatcher(systemsLogger, logCatLogger);
init();
}
private void init() {
myLogger.logMessage("Starting helper");
// some code here
openFile();
}
private void openFile() {
myLogger.logMessage("Opening task");
// some code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment