Skip to content

Commit

Permalink
Prepare release 1.2.0
Browse files Browse the repository at this point in the history
- Update dependencies
- Improve documentation for usage of `autolog-aspectj` module
  • Loading branch information
maximevw committed Oct 24, 2020
1 parent 604745c commit f1c0bbd
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 40 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.2.0] - 2020-10-24
### Added
- Add a new module `autolog-aspectj` to allow usage of Autolog annotations in applications using AspectJ weaving.
- Add the ability to use custom logger names instead of the default one (`"Autolog"`):
Expand Down Expand Up @@ -51,6 +51,7 @@ annotations `@AutoLogMethodInput` or `@AutoLogMethodInOut`.
### Added
- Initial release.

[Unreleased]: https://github.com/maximevw/autolog/compare/v1.1.0...HEAD
[Unreleased]: https://github.com/maximevw/autolog/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/maximevw/autolog/releases/tag/v1.2.0
[1.1.0]: https://github.com/maximevw/autolog/releases/tag/v1.1.0
[1.0.0]: https://github.com/maximevw/autolog/releases/tag/v1.0.0
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ the following Maven dependencies:
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-spring</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```
* In an application using AspectJ weaving for logging automation by AOP:
```xml
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-aspectj</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```
* In a classic Java application, you can use logging methods provided by Autolog without automation by AOP (not
Expand All @@ -54,7 +54,7 @@ recommended):
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-core</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```

Expand Down Expand Up @@ -99,7 +99,31 @@ In Spring Boot applications, the `LoggerManager` can be configured in the applic
of `LoggerInterface` implementations to register in the property `autolog.loggers`) thanks to the auto-configuration
class `AutologAutoConfiguration`.

### Basic example
### Usage with AspectJ weaving

In order to use AspectJ weaving for logging automation by AOP, in addition to the dependency to `autolog-aspectj`,
ensure to have `org.aspectj:aspectjrt` in your classpath and to compile your application using AspectJ weaving,
including the dependency to `autolog-aspectj` in the weaved dependencies.

At the starting of your application, insert the following code to instantiate the `LoggerManager` required by Autolog
for logging automation:
```java
public class HelloApplication {
public static void main(final String[] args) {
// Instantiate Autolog.
final LoggerManager loggerManager = new LoggerManager();
// Register any loggers you want to use. See LoggerManager documentation for further details.
// loggerManager.register(...);
AspectJLoggerManager.getInstance().init(loggerManager);

// Put the code of your application here...
}
}
```

Now, you can use Autolog annotations into your application.

### Basic example with a Spring application

Assuming your application is a REST API developed with Spring Web framework using an implementation of Slf4j for
logging.
Expand Down
4 changes: 2 additions & 2 deletions autolog-aspectj/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>

<artifactId>autolog-aspectj</artifactId>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-core</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<exclusions>
<!-- Do not include Logback transitively for the applications not using it -->
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.github.maximevw.autolog.core.logger.LoggingUtils;
import com.github.maximevw.autolog.core.logger.MethodPerformanceLogEntry;
import com.github.maximevw.autolog.core.logger.MethodPerformanceLogger;
import com.github.maximevw.autolog.core.logger.adapters.Log4j2Adapter;
import com.github.maximevw.autolog.core.logger.performance.AdditionalDataProvider;
import com.github.maximevw.autolog.core.logger.performance.PerformanceTimer;
import org.apache.commons.lang3.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -48,7 +48,8 @@ class AspectJLoggerManagerTest {
* provided by the {@link AspectJLoggerManager} singleton when it is not initialized.
*/
@Test
@Order(0) // Always run it first to be sure that the singleton has not been already initialized.
// Always run it first to be sure that the singleton has not been already initialized.
@Order(0)
public void givenNoSpecificLoggerManager_whenGetLoggerManager_returnDefaultLoggerManager() {
final LoggerManager loggerManager = AspectJLoggerManager.getInstance().getLoggerManager();
final List<LoggerInterface> registeredLoggers = loggerManager.getRegisteredLoggers();
Expand Down
2 changes: 1 addition & 1 deletion autolog-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>

<artifactId>autolog-core</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions autolog-coverage-reporting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>autolog</artifactId>
<groupId>com.github.maximevw</groupId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>

<artifactId>autolog-coverage-reporting</artifactId>
Expand All @@ -33,17 +33,17 @@
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-core</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-aspectj</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-spring</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions autolog-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>

<artifactId>autolog-spring</artifactId>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.github.maximevw</groupId>
<artifactId>autolog-aspectj</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>

<dependency>
Expand Down
42 changes: 21 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.maximevw</groupId>
<artifactId>autolog</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<packaging>pom</packaging>

<name>Autolog</name>
Expand Down Expand Up @@ -84,41 +84,41 @@
<!-- Dependencies and plugins versions management -->
<apiguardian.version>1.1.0</apiguardian.version>
<aspectj.version>1.9.5</aspectj.version>
<checkstyle.version>8.32</checkstyle.version>
<commons-lang.version>3.10</commons-lang.version>
<commons-text.version>1.8</commons-text.version>
<compile-testing.version>0.18</compile-testing.version>
<guava.version>29.0-jre</guava.version>
<checkstyle.version>8.36.2</checkstyle.version>
<commons-lang.version>3.11</commons-lang.version>
<commons-text.version>1.9</commons-text.version>
<compile-testing.version>0.19</compile-testing.version>
<guava.version>30.0-jre</guava.version>
<hamcrest.version>2.2</hamcrest.version>
<jackson-databind.version>2.11.0</jackson-databind.version>
<jackson-dataformat-xml.version>2.11.0</jackson-dataformat-xml.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<jackson-databind.version>2.11.3</jackson-databind.version>
<jackson-dataformat-xml.version>2.11.3</jackson-dataformat-xml.version>
<jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
<jakarta-ws-rs.version>2.1.6</jakarta-ws-rs.version>
<junit-jupiter.version>5.6.2</junit-jupiter.version>
<junit-platform.version>1.6.2</junit-platform.version>
<junit-jupiter.version>5.7.0</junit-jupiter.version>
<junit-platform.version>1.7.0</junit-platform.version>
<h2.version>1.4.200</h2.version>
<license-maven-plugin.version>2.0.0</license-maven-plugin.version>
<log4j2.version>2.13.3</log4j2.version>
<logback.version>1.2.3</logback.version>
<logstash-logback-encoder.version>6.3</logstash-logback-encoder.version>
<lombok.version>1.18.12</lombok.version>
<lombok-maven-plugin.version>1.18.10.0</lombok-maven-plugin.version>
<logstash-logback-encoder.version>6.4</logstash-logback-encoder.version>
<lombok.version>1.18.16</lombok.version>
<lombok-maven-plugin.version>1.18.16.0</lombok-maven-plugin.version>
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<maven-shade-plugin.version>3.2.1</maven-shade-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<mockito.version>3.3.3</mockito.version>
<owasp-dependency-check.version>5.3.2</owasp-dependency-check.version>
<mockito.version>3.5.15</mockito.version>
<owasp-dependency-check.version>6.0.2</owasp-dependency-check.version>
<slf4j.version>1.7.30</slf4j.version>
<slf4j-test.version>1.2.0</slf4j-test.version>
<spring.version>5.2.5.RELEASE</spring.version>
<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
<spring.version>5.2.9.RELEASE</spring.version>
<spring-boot.version>2.3.4.RELEASE</spring-boot.version>
<velocity.version>1.7</velocity.version>
<velocity-tools.version>2.0</velocity-tools.version>
</properties>
Expand Down

0 comments on commit f1c0bbd

Please sign in to comment.