factory: add SetLogger API#521
Conversation
virtcontainers/factory/factory.go
Outdated
| func SetLogger(logger logrus.FieldLogger) { | ||
| fields := logrus.Fields{ | ||
| "source": "virtcontainers", | ||
| "arch": runtime.GOARCH, |
There was a problem hiding this comment.
I see this is basically doing the same as virtcontainers/api.go:SetLogger(). But I'm wondering why we don't just add the arch field here:
But also, you might want to add a "subsystem": "factory" field as we've done that in various parts of vc (like network.go).
There was a problem hiding this comment.
Good point about moving arch to main.go.
As for subsystem, it is set in factory.log() function.
|
PSS Measurement: Memory inside container: |
So that we actually use the same logger as other packages when being invoked by CLI. Fixes: kata-containers#520 Signed-off-by: Peng Tao <bergwolf@gmail.com>
|
PSS Measurement: Memory inside container: |
|
Build succeeded (third-party-check pipeline).
|
|
fedora CI failed on #525. restarting. |
Codecov Report
@@ Coverage Diff @@
## master #521 +/- ##
=========================================
Coverage ? 66.67%
=========================================
Files ? 93
Lines ? 9580
Branches ? 0
=========================================
Hits ? 6387
Misses ? 2506
Partials ? 687
Continue to review full report at Codecov.
|
As of kata-containers#521, the runtime now adds the `arch` log field so `virtcontainers` doesn't need to set it too. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
As of kata-containers#521, the runtime now adds the `arch` log field so `virtcontainers` doesn't need to set it too. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
As of kata-containers#521, the runtime now adds the `arch` log field so `virtcontainers` doesn't need to set it too. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
agent: Add support for local storage
So that we actually use the same logger as other packages when being
invoked by CLI.
Fixes: #520