EasyLog - Quick Start - Spring Projects



Setup pom.xml

First, you need to setup your parent project

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
    </parent>

Second, you need to add 2 dependencies

    <dependency>
        <groupId>io.lenar</groupId>
        <artifactId>easy-log</artifactId>
        <version>1.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-aop</artifactId>
        <version>2.0.3.RELEASE</version>
    </dependency>

If your project already has a different parent project (that project also has to pe a Spring project as well) you might not need spring-boot-starter-aop - just check

Extend EasyLogger

In your project create the class that extends the EasyLogger aspect and add the @Component annotation.

import io.lenar.easy.log.EasyLogger;
import org.springframework.stereotype.Component;

@Component
public class MyLogger extends EasyLogger {
}