Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oshai authored Jan 8, 2025
1 parent 5169c94 commit ef98337
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,6 @@ class FooWithLogging {
}
```


## Version 5 vs. previous versions

Version 5 is not backward compatible with previous versions (v.3, v.2, v.1). Group id (in maven) and packages names changed.
It is possible to use both version 5 and previous versions side-by-side so some of the code from the old version
and some new. It is also possible to have libs using old version and use the new version (and vice-versa).
In that sense it's a completely new dependency.

Main changes are:
- Maven group id changed from `io.github.microutils` -> `io.github.oshai`.
- Root package change from `mu` -> `io.github.oshai.kotlinlogging`.
- Slf4j dependency is not provided anymore (users have to provide it). It means that >= 5.x can work with both slf4j 1 or 2.
- There are changes to multiplatform class hierarchy that might break compatibility.

More details in issue [#264](https://github.com/oshai/kotlin-logging/issues/264),
and in the [change log](https://github.com/oshai/kotlin-logging/blob/master/ChangeLog.md)

## Download

**Important note:** kotlin-logging depends on slf4j-api (in the JVM artifact). In runtime, it is also required to depend on a logging implementation. More details in [how-to-configure-slf4j](http://saltnlight5.blogspot.co.il/2013/08/how-to-configure-slf4j-with-different.html). And an excellent detailed explanation in [a-guide-to-logging-in-java](https://www.marcobehler.com/guides/a-guide-to-logging-in-java).
Expand All @@ -90,15 +73,15 @@ In short, if you just want to log statements to stdout, it's possible to add the
<dependency>
<groupId>io.github.oshai</groupId>
<artifactId>kotlin-logging-jvm</artifactId>
<version>7.0.0</version>
<version>7.0.3</version>
</dependency>
```

See the full example in [kotlin-logging-example-maven](https://github.com/oshai/kotlin-logging-example-maven).

### Gradle
```Groovy
implementation 'io.github.oshai:kotlin-logging-jvm:7.0.0'
implementation 'io.github.oshai:kotlin-logging-jvm:7.0.3'
```


Expand All @@ -116,6 +99,25 @@ After seeing many questions like [Idiomatic way of logging in Kotlin](http://sta
- A straight forward way to log messages with lazy-evaluated string using lambda expression `{}`.
- All previous slf4j implementation can still be used.


## Version 5 vs. previous versions

Version 5 is not backward compatible with previous versions (v.3, v.2, v.1). Group id (in maven) and packages names changed.
It is possible to use both version 5 and previous versions side-by-side so some of the code from the old version
and some new. It is also possible to have libs using old version and use the new version (and vice-versa).
In that sense it's a completely new dependency.

Main changes are:
- Maven group id changed from `io.github.microutils` -> `io.github.oshai`.
- Root package change from `mu` -> `io.github.oshai.kotlinlogging`.
- Slf4j dependency is not provided anymore (users have to provide it). It means that >= 5.x can work with both slf4j 1 or 2.
- There are changes to multiplatform class hierarchy that might break compatibility.

More details in issue [#264](https://github.com/oshai/kotlin-logging/issues/264),
and in the [change log](https://github.com/oshai/kotlin-logging/blob/master/ChangeLog.md)



## Who is using it

- https://www.jetbrains.com/youtrack/ (https://www.jetbrains.com/help/youtrack/standalone/Third-Party-Software-Used-by-YouTrack.html)
Expand Down

0 comments on commit ef98337

Please sign in to comment.