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

Feature/logfile #8

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Conversation

9eCyberSec
Copy link

Added a flag to define a log file that saves the log seperatly.

Added a flag to define a log file that saves the log seperatly.

Signed-off-by: llogen <[email protected]>
Added comment.

Signed-off-by: llogen <[email protected]>
@mimir-d
Copy link
Member

mimir-d commented Oct 21, 2021

at a glance, the test failure doesnt seem related, but just to make sure @9eCyberSec can you run ./run_tests.sh locally and see if it fails in the same way? You should just need docker (+compose) as deps

@9eCyberSec
Copy link
Author

Locally it just works fine.

@mimir-d
Copy link
Member

mimir-d commented Nov 8, 2021

i've no idea why github didnt send any notifications for your last message, so sorry about that; i'll pull the branch and see why that test is failing

@mimir-d
Copy link
Member

mimir-d commented Nov 24, 2021

ok, so i ran this a couple of times over the last 2 weeks and it does fail sometimes with timeout. There have been some fixes for tests in the meantime, could you try to rebase on latest and push? Thanks

Copy link
Member

@mimir-d mimir-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returning for the rebase

Added a flag to define a log file that saves the log seperatly.

Signed-off-by: llogen <[email protected]>
@llogen
Copy link

llogen commented Nov 29, 2021

Thank you for your answer, i did the rebase. Hope it works now.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@4ca8170). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage        ?   66.14%           
=======================================
  Files           ?      156           
  Lines           ?     9347           
  Branches        ?        0           
=======================================
  Hits            ?     6183           
  Misses          ?     2498           
  Partials        ?      666           
Flag Coverage Δ
e2e 50.39% <0.00%> (?)
integration 57.31% <0.00%> (?)
unittests 47.19% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out 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 4ca8170...a7f74b1. Read the comment docs.

@mimir-d
Copy link
Member

mimir-d commented Dec 1, 2021

cool, the tests run now; just need to signoff for the DCO

@mimir-d
Copy link
Member

mimir-d commented Aug 8, 2022

seems this didnt get any updates since last year; i'll comandeer later on and merge

mimir-d
mimir-d previously approved these changes May 9, 2024
@9eCyberSec 9eCyberSec dismissed mimir-d’s stale review May 9, 2024 21:46

The merge-base changed after approval.

@mimir-d mimir-d changed the base branch from main to develop May 9, 2024 21:46
return err
}
defer f.Close()
log.OriginalLogger().(*logrus.Entry).Logger.SetOutput(io.MultiWriter(os.Stderr, f))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xaionaro does this make sense here? i dont know if we actually use logrus anymore

Copy link
Member

@xaionaro xaionaro May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont know if we actually use logrus anymore

At least the upstream version of contest uses logrus:
https://github.com/linuxboot/contest/blob/develop/pkg/logging/default_options.go#L25

does this make sense here?

It kinda does. But a cleaner solution would be to feed an option to https://github.com/linuxboot/contest/blob/develop/pkg/logging/default_options.go#L21-L24 to add a multiwriter there if needed (to avoid type assertions; or at least to keep them local to where we make sure it is logrus). If one wants to avoid a type assertion at all then they can manually initialize a logrus instance and wrap it using this function: https://github.com/facebookincubator/go-belt/blob/main/tool/logger/implementation/logrus/logger.go#L484

Or if people are lazy, they can just move this line into the function WithBelt (to keep the assertion local to where we build a logrus logger).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's what I was thinking. that type assertion looks kinda off to me. Not sure what we can do here, because this PR comes from a 9elements repo so we can't fix anything on this branch without the original author

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.

5 participants