Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mission Logs using Logback #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HimanshuSahu31
Copy link
Contributor

This fix exposes an endpoint to get log information for a mission under execution. I've used Logback implementation of Slf4j API to use appenders which will be able to filter required events and publish them to consumers. Information can be added to MDC just before the log event is sent and this information will be extracted by the appender.

WIP below tasks:

  • Add javadoc
  • Add Tests
  • Evaluate and add more meaningful log statements to implementations of MissionExecutor, StrandExecutor and LeafExecutor. (Currently, I've handled MDC statements in SingleNodeMissionExecutor only.)

Fixes #20

@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #38 into master will decrease coverage by 3.68%.
The diff coverage is 6.55%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #38      +/-   ##
============================================
- Coverage     48.07%   44.38%   -3.69%     
- Complexity      393      394       +1     
============================================
  Files            95      105      +10     
  Lines          1922     2102     +180     
  Branches        150      163      +13     
============================================
+ Hits            924      933       +9     
- Misses          973     1144     +171     
  Partials         25       25
Impacted Files Coverage Δ Complexity Δ
...a/io/molr/mole/server/main/DemoMolrServerMain.java 0% <ø> (ø) 0 <0> (ø) ⬇️
.../io/molr/mole/core/runnable/RunnableLeafsMole.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...molr/mole/core/logging/publisher/LogPublisher.java 0% <0%> (ø) 0 <0> (?)
...rc/main/java/io/molr/mole/core/api/MoleWebApi.java 33.33% <0%> (-4.17%) 3 <0> (ø)
.../java/io/molr/mole/remote/rest/RestRemoteMole.java 85.18% <0%> (-6.82%) 10 <0> (ø)
...lr/mole/core/logging/LogAppenderConfiguration.java 0% <0%> (ø) 0 <0> (?)
.../io/molr/mole/server/rest/MolrMoleRestService.java 33.33% <0%> (-1.67%) 4 <0> (ø)
...mole/core/logging/consumer/LogConsumerFactory.java 0% <0%> (ø) 0 <0> (?)
...n/java/io/molr/mole/core/local/LocalSuperMole.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...o/molr/mole/core/logging/appender/LogAppender.java 0% <0%> (ø) 0 <0> (?)
... and 19 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 a2d9f69...270a51e. Read the comment docs.

@kaifox
Copy link
Member

kaifox commented Feb 6, 2020

Hi Guys, I just looked through the 2 available branches concerning the logs ... It looks that we could try to keep this one and delete the other one ... Basing future efforts based on this could be ok (though still some work to do).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a standard way to recuperate mission logs from moles.
2 participants