dvillavicencio / riven-bot

Discord Bot for Destiny 2 that retrieves statistics regarding Raid and Dungeon activities through Discord chat
2 stars 0 forks source link

Logging | Create Logging configuration file #96

Closed dvillavicencio closed 4 months ago

dvillavicencio commented 5 months ago

This task is responsible for adding the logback-spring.xml configuration file for setting up all the necessary appenders for Loki as well as adding any dependencies to the bot on the project loki4j.

Acceptance Criteria

  1. Add a logback-spring.xml configuration file under /src/resources and add <springProfiles> for both local and prod profiles. A sample configuration file could be:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <!--  local configuration -->
    <springProfile name="local">
    <configuration>
      <appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
            ... 
      </appender>
    
      <root level="INFO">
        <appender-ref ref="LOKI"/>
      </root>
    </configuration>
    <!--  prod configuration -->
    </springProfile>
    <springProfile name="prod">
         ... 
    </springProfile>
      <root level="INFO">
        <appender-ref ref="LOKI"/>
      </root>
    </configuration>
    </springProfile>
    </configuration>
  2. Add dependency for Loki4j detailed above