Skip to content

Releases: orhanobut/logger

2.2.0

24 Mar 05:07
1e9ea42
Compare
Choose a tag to compare
  • More documentation are added for public api.
  • Support annotations (NonNull and Nullable) are added for each possible place. This makes it more easier to use in Kotlin.
  • New dependency configurations are used.
  • All dependencies are updated.

Thanks to @svenjacobs for the contribution.

2.1.1

06 Jun 11:56
Compare
Choose a tag to compare

Fixed NPE issue for Logger.d(null)

2.1.0

28 May 22:34
Compare
Choose a tag to compare
  • Line decoration is changed to single line instead of double. Way more compact now.

screen shot 2017-05-29 at 00 04 48

  • Logger.d(null) or Logger.d(new int[]{1,3,5}) crashes are fixed. Logger.d(object) accept anything now and doesn't crash.

2.0.0

27 May 15:18
Compare
Choose a tag to compare
  • LogAdapter functionality is changed. Log adapter decides when to log with isLoggable and how to log with format strategy. You can create your custom adapter and add to Logger. Logger now accepts multiple log adapters.

  • Initialization changed. Old style is not supported any longer. Use the following style with log adapters. This approach allows you to add multiple adapters and each adapter contains different logic.

Logger.addLogAdapter(new AndroidLogAdapter());
  • FormatStrategy added. With format strategy, you can have different output format such as normal pretty look or csv. You can also add your custom format.

  • Settings is removed. Format settings are associated with format strategy. Use the built-in functions to change the appearance or behavior.

FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
  .showThreadInfo(false)  // (Optional) Whether to show thread info or not. Default true
  .methodCount(0)         // (Optional) How many method line to show. Default 2
  .methodOffset(7)        // (Optional) Hides internal method calls up to offset. Default 5
  .logStrategy(customLog) // (Optional) Changes the log strategy to print out. Default LogCat
  .tag("My custom tag")   // (Optional) Custom tag for each log. Default PRETTY_LOGGER
  .build();

Logger.addLogAdapter(new AndroidLogAdapter(formatStrategy));
  • LogStrategy added. Log stratey decides what to do with the input, for example: print out to logcat or save it to file. You can create your custom log strategy as well.

  • LogLevel removed. There are many different ways when it comes to what to log and when to log. Therefore decision is now up to the developer. Log adapters contain isLoggable function. Simply override it and put your log condition.

Logger.addLogAdapter(new AndroidLogAdapter(){
  @Override public boolean isLoggable(int priority, String tag) {
    return BuildConfig.DEBUG;
  }
});
  • DiskLogAdapter added. Save output to file, CSV format is supported.
Logger.addLogAdapter(new DiskLogAdapter());
  • Divider's width is increased. Visual appearance change.

  • For more details about the new structure, check the diagram how it works.

1.15

27 May 14:01
Compare
Choose a tag to compare

1.12 release

06 Oct 12:10
Compare
Choose a tag to compare
  • Log util can can be injected now.
.logTool()
  • clear() method added in order to clear the static fields when no needed
  • some static fields converted to local
  • jitpack support added

v11-release

02 Aug 10:01
Compare
Choose a tag to compare
  • Tests added
  • android manifest backup removed

v1.10 release

30 May 10:07
Compare
Choose a tag to compare

Method count stack offset feature added. With this feature you can integrate the logger easily with other libraries.

Logger.init()
    .setMethodOffset(5);

v1.9 Release

25 May 09:36
Compare
Choose a tag to compare

method count bug fix

v1.8-release

13 Apr 10:56
Compare
Choose a tag to compare
  • Logger.json and Logger.xml fixes