Skip to content

Commit

Permalink
Updated changelog and maven config
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanMcKee committed Nov 19, 2017
1 parent ab0810e commit e54d48f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Change Log
==========

Version 1.0.0 *(2017-05-21)*
Version 1.0.0 *(2017-11-19)*
----------------------------

* Initial release
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,31 @@

This library provides a JUnit TestRule that plants a temporary Timber tree that pipes any logs sent via Timber to the standard System.out. Once a unit test has completed, the Timber tree is removed to avoid logging unintended test cases.

## Usage
Using the library is very straight forward. An example is as follows:

```java
public class TestExample {
@Rule
public TimberTestRule mTimberTestRule = TimberTestRule.builder()
.minPriority(Log.ERROR)
.showThread(true)
.showTimestamp(false)
.onlyLogWhenTestFails(true)
.build();
}
```

### Configuration
As seen in the example above, there are many ways to modify the output using the following behaviours:
- The minimum log level to output.
- Whether thread ids are shown.
- Whether timestamps are shown.
- Whether to always log, or only log when a unit test fails.

## Download
This library is available on Maven, you can add it to your project using the following gradle dependencies:

```gradle
testCompile 'net.lachlanmckee:timber-junit:1.0.0'
testCompile 'net.lachlanmckee:timber-junit-rule:1.0.0'
```
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ VERSION_NAME=1.0.0

POM_DESCRIPTION=JUnit TestRule that pipes Android Timber logs to the standard console

POM_URL=https://github.com/LachlanMcKee/timber-junit
POM_SCM_URL=https://github.com/LachlanMcKee/timber-junit
POM_SCM_CONNECTION=scm:git:git://github.com/LachlanMcKee/timber-junit.git
POM_SCM_DEV_CONNECTION=scm:git:git://github.com/LachlanMcKee/timber-junit.git
POM_URL=https://github.com/LachlanMcKee/timber-junit-rule
POM_SCM_URL=https://github.com/LachlanMcKee/timber-junit-rule
POM_SCM_CONNECTION=scm:git:git://github.com/LachlanMcKee/timber-junit-rule.git
POM_SCM_DEV_CONNECTION=scm:git:git://github.com/LachlanMcKee/timber-junit-rule.git

POM_LICENCE_NAME=MIT License
POM_LICENCE_URL=http://www.opensource.org/licenses/mit-license.php
Expand Down
4 changes: 2 additions & 2 deletions timber-junit/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POM_ARTIFACT_ID=timber-junit
POM_NAME=Timber-JUnit
POM_ARTIFACT_ID=timber-junit-rule
POM_NAME=Timber-JUnit-Rule
POM_PACKAGING=aar

0 comments on commit e54d48f

Please sign in to comment.