@Test(expected = IllegalStateException.class) public void initialize_not_called() { historian.log(Log.DEBUG, TAG, "this is debug1"); }
public void log(int priority, String tag, String message) { checkInitialized(); if (priority < logLevel) return; if (message == null || message.length() == 0) return; executorService.execute( new LogWritingTask( callbacks, logWriter, LogEntity.create(priority, tag, message, System.currentTimeMillis()) ) ); }
Historian { public void log(int priority, String tag, String message) { checkInitialized(); if (priority < logLevel) return; if (message == null || message.length() == 0) return; executorService.execute( new LogWritingTask( callbacks, logWriter, LogEntity.create(priority, tag, message, System.currentTimeMillis()) ) ); } }
Historian { public void log(int priority, String tag, String message) { checkInitialized(); if (priority < logLevel) return; if (message == null || message.length() == 0) return; executorService.execute( new LogWritingTask( callbacks, logWriter, LogEntity.create(priority, tag, message, System.currentTimeMillis()) ) ); } private  Historian(Context context,
                    File directory,
                    String name,
                    int size,
                    int logLevel,
                    boolean debug,
                    Callbacks callbacks); }
Historian { public void log(int priority, String tag, String message) { checkInitialized(); if (priority < logLevel) return; if (message == null || message.length() == 0) return; executorService.execute( new LogWritingTask( callbacks, logWriter, LogEntity.create(priority, tag, message, System.currentTimeMillis()) ) ); } private  Historian(Context context,
                    File directory,
                    String name,
                    int size,
                    int logLevel,
                    boolean debug,
                    Callbacks callbacks); @CheckResult static Builder builder(Context context); void initialize(); void log(int priority, String tag, String message); void terminate(); void delete(); String dbPath(); String dbName(); }
Historian { public void log(int priority, String tag, String message) { checkInitialized(); if (priority < logLevel) return; if (message == null || message.length() == 0) return; executorService.execute( new LogWritingTask( callbacks, logWriter, LogEntity.create(priority, tag, message, System.currentTimeMillis()) ) ); } private  Historian(Context context,
                    File directory,
                    String name,
                    int size,
                    int logLevel,
                    boolean debug,
                    Callbacks callbacks); @CheckResult static Builder builder(Context context); void initialize(); void log(int priority, String tag, String message); void terminate(); void delete(); String dbPath(); String dbName();  }