Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
piomin committed Mar 22, 2024
1 parent 10246a2 commit 0639a20
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 10 deletions.
38 changes: 37 additions & 1 deletion logging-spring-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,45 @@
<version>2.0.3</version>
</parent>

<groupId>pl.piomin</groupId>
<artifactId>logging-spring-commons</artifactId>

<name>logging-spring-commons</name>
<description>Library for HTTP logging with Spring Boot</description>
<url>https://github.com/piomin/spring-boot-logging</url>

<developers>
<developer>
<name>Piotr Mińkowski</name>
<email>[email protected]</email>
<url>https://github.com/piomin</url>
</developer>
</developers>

<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/piomin/spring-boot-logging.git</connection>
<developerConnection>scm:git:[email protected]:piomin/spring-boot-logging.git</developerConnection>
<url>https://github.com/piomin/spring-boot-logging</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
27 changes: 18 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@ In short, let’s begin from a brief review of main features provided by logstas
4. It is auto-configurable Spring Boot library – you don’t have to do anything more than including it as a dependency to your application to make it work

## Getting started
The current version of library is `2.0.1`.\
For logging with Spring WebMvc:
The current version of library is `2.0.3`.\
For logging with Spring WebMvc and Logstash:
```
<dependency>
<groupId>com.github.piomin</groupId>
<artifactId>logstash-logging-spring-boot-starter</artifactId>
<version>2.0.1</version>
<version>2.0.3</version>
</dependency>
```

For logging with Spring WebMvc and Loki:
```
<dependency>
<groupId>com.github.piomin</groupId>
<artifactId>loki-logging-spring-boot-starter</artifactId>
<version>2.0.3</version>
</dependency>
```

Expand All @@ -42,22 +51,22 @@ For logging with Spring WebFlux:
<dependency>
<groupId>com.github.piomin</groupId>
<artifactId>reactive-logstash-logging-spring-boot-starter</artifactId>
<version>2.0.1</version>
<version>2.0.3</version>
</dependency>
```

By default, the library is enabled, but tries to locate Logback configuration inside your application to settings for Logstash appender. If such appender won’t be found, the library uses Spring Boot default logging configuration, which does not include Logstash appender. To force it use auto-configured appender definition inside library we have to set property logging.logstash.enabled to `true`.
By default, the library is enabled, but tries to locate Logback configuration inside your application to settings for Logstash appender. If such appender won’t be found, the library uses Spring Boot default logging configuration, which does not include Logstash appender. To force it use auto-configured appender definition inside library we have to set property `logging.logstash.enabled` to `true`.
```
logging.logstash:
enabled: true
url: 192.168.99.100:5000
url: loki.example.com:5000
```

## Manual add jar to pom.xml

Add `reactive-logstash-logging-spring-boot-starter-2.0.1.pom` to `${basedir}/dependencies`
Add `reactive-logstash-logging-spring-boot-starter-2.0.3.pom` to `${basedir}/dependencies`

Add `pom.xml` to `${basedir}/dependencies` and rename to `reactive-logstash-logging-spring-boot-starter-1.4.0.RELEASE.pom`
Add `pom.xml` to `${basedir}/dependencies` and rename to `reactive-logstash-logging-spring-boot-starter-2.0.3.pom`

Add this script to `pom.xml` in plugins section.

Expand All @@ -69,7 +78,7 @@ Add this script to `pom.xml` in plugins section.
<configuration>
<groupId>com.github.piomin</groupId>
<artifactId>reactive-logstash-logging-spring-boot-starter</artifactId>
<version>2.0.1</version>
<version>2.0.3</version>
<packaging>jar</packaging>
<file>${basedir}/dependencies/reactive-logstash-logging-spring-boot-starter-1.3.1.RELEASE.jar</file>
<generatePom>false</generatePom>
Expand Down

0 comments on commit 0639a20

Please sign in to comment.