sirjonasxx / G-Earth

Cross-platform Habbo packet manipulator
MIT License
88 stars 47 forks source link

Implement basic logging using logback #144

Closed UnfamiliarLegacy closed 1 year ago

UnfamiliarLegacy commented 1 year ago

⚠️ This PR should be merged after https://github.com/sirjonasxx/G-Earth/pull/143 is merged.

This PR introduces a "getting started" for getting logging integrated into G-Earth. When working on G-Earth or requesting information from users, it would be very useful if there is a log available with precise information on what happened.

My intent is to get this PR merged ASAP so G-Earth developers can start using

private static final Logger logger = LoggerFactory.getLogger(<class>.class);

to passively add proper logging to any new and/or old code.

In the pom.xml, some dependencies have the slf4j-api dependency excluded because they reference an older version. The logback-classic dependency introduces the slf4j-api version 2.0.4. So this is done to prevent conflicts.

logback-classic dependency is targeting a slightly older version (1.3.5) because the later versions require an higher Java version. Since G-Earth is stuck on Java 8 at this moment we can't bump the version.