alpha-asp / Alpha

A lazy-grounding Answer-Set Programming system
BSD 2-Clause "Simplified" License
58 stars 10 forks source link

cli: Logging via SLF4J SimpleLogger #323

Closed lorenzleutgeb closed 2 years ago

lorenzleutgeb commented 2 years ago

For context see https://github.com/alpha-asp/Alpha/pull/317#issuecomment-995282120.

In the light of CVE-2021-44228, CVE-2021-45046. Removes Log4j from Alpha's dependencies, uses SLF4J's SimpleLogger instead.

Since we're using SLF4J bindings, switching the logging implementation is very easy (2 lines changed; as long as it implements SLF4J).

Note that this changes the logging output format. The new logging implementation is not as configurable. See the configuration options in the corresponding JavaDoc.

codecov[bot] commented 2 years ago

Codecov Report

Merging #323 (4efac64) into master (1fcdaff) will increase coverage by 0.69%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #323      +/-   ##
============================================
+ Coverage     69.53%   70.23%   +0.69%     
- Complexity     2101     2123      +22     
============================================
  Files           182      182              
  Lines          8023     8023              
  Branches       1423     1423              
============================================
+ Hits           5579     5635      +56     
+ Misses         2084     2028      -56     
  Partials        360      360              
Impacted Files Coverage Δ
.../kr/alpha/core/solver/NoGoodStoreAlphaRoaming.java 81.41% <0.00%> (+0.20%) :arrow_up:
...c/tuwien/kr/alpha/core/solver/TrailAssignment.java 80.05% <0.00%> (+0.29%) :arrow_up:
...uwien/kr/alpha/core/solver/heuristics/BerkMin.java 76.04% <0.00%> (+1.04%) :arrow_up:
...ien/kr/alpha/core/depgraph/ComponentGraphImpl.java 100.00% <0.00%> (+1.58%) :arrow_up:
...e/solver/learning/GroundConflictNoGoodLearner.java 80.66% <0.00%> (+1.65%) :arrow_up:
.../tuwien/kr/alpha/core/solver/heuristics/VSIDS.java 94.44% <0.00%> (+2.77%) :arrow_up:
.../ac/tuwien/kr/alpha/core/solver/DefaultSolver.java 71.11% <0.00%> (+5.05%) :arrow_up:
...java/at/ac/tuwien/kr/alpha/core/solver/Choice.java 92.85% <0.00%> (+7.14%) :arrow_up:
.../solver/heuristics/ChainedBranchingHeuristics.java 88.09% <0.00%> (+9.52%) :arrow_up:
...ava/at/ac/tuwien/kr/alpha/core/atoms/Literals.java 90.00% <0.00%> (+10.00%) :arrow_up:
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1fcdaff...4efac64. Read the comment docs.

madmike200590 commented 2 years ago

Some additions:

I also took the opportunity to fix the project version (now: 0.6-SNAPSHOT) and slightly adapt the filename of our bundled jar (now includes alpha version)

@lorenzleutgeb and @AntoniusW if my additions make sense to you, please merge.

lorenzleutgeb commented 2 years ago

LGTM, waiting for checks.