-
Notifications
You must be signed in to change notification settings - Fork 82
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
cmd/oci-image-tool: use logrus to ease printing to stdout #14
Comments
From @s-urbaniak on September 9, 2016 9:15 logrus is pretty accepted in the ecosystem, and structured logging doesn't On Fri, Sep 9, 2016 at 10:46 AM Antonio Murdaca [email protected]
|
From @xiekeyang on September 9, 2016 10:1 +1 |
From @runcom on September 9, 2016 10:4 I'll work on this once we reach consensus and figure out all the other issues about errors/warnings when validating an image, I would love to have a table-like document which lists soft and hard requirement for image validation w/o having to go through the whole spec to figure out MUST and SHOULD. Do you guys think it would be nice/useful to have such a document for oci-image-tool? |
From @xiekeyang on September 9, 2016 10:16 It is deep related to #234 |
From @s-urbaniak on September 9, 2016 10:25 xfref regarding "how to inject the logger": opencontainers/image-spec#234 (comment) I am in favor of classical dependency injection as per https://peter.bourgon.org/go-best-practices-2016/#program-design. |
From @wking on September 9, 2016 15:27 On Fri, Sep 09, 2016 at 03:25:13AM -0700, Sergiusz Urbaniak wrote:
I'm ok with including a logger in our types to avoid relying on global
Both of those can happen independently. The first should be |
From @runcom on September 9, 2016 15:29
totally agree on this point |
From @runcom on September 9, 2016 8:46
$SUBJECT - logrus have various and a nicer way of printing logs to stdout with the option to specify the log level (which can then be used to differentiate the validation level in a nicer way).
The current way of embedding stdout in the validation struct isn't as pretty as it would be by having a nicer logger like logrus.
I would also suggest to have a context (not necessary
context.Context
) object which can be used to embed system stuff like a logger - to be the first argument to function likedescriptor.Validate(ctx, ...)
so we extract the logger from there and print while validating. (Right now this isn't possible, and the logger should be explicitly passed toValidate
changing its definition). @stevvooe wdyt?@s-urbaniak wdyt?
/cc @vbatts @stevvooe @philips
Copied from original issue: opencontainers/image-spec#288
The text was updated successfully, but these errors were encountered: