-
Notifications
You must be signed in to change notification settings - Fork 374
Logging system for kata-containers #3
Comments
As discussed in the meeting, I created the issue, correct me if there is anything wrong. |
A quick github search turned up this: |
or (/me goes to check)... is that the same glog. hmm... |
@grahamwhaley it creates an implementation of the glog interface it seems. |
Since there is no more discussion on this topic, I wrote a log adapter to allow using glog as the output of logrus: https://github.com/gnawux/glog4logrus then we could coding with logrus and log to logrus or glog as required. Any comments? |
@gnawux Thanks a lot.
logrus.SetLevel(glog4logrus.GlogLevel())
logrus.SetFormatter(&glog4logrus.GlogFormatter{})
logrus.SetOutput(&glog4logrus.GlogOuptut{}) |
Or should we expose an option to user and let user choose which log system to use? For example:
|
@sameo @WeiZhang555 The simple answer is No. I used to think about such ways. However, if you read more
Then how to use If you have a program use kata as a library, say Let me summary here:
|
@gnawux I think this is the right approach, thanks for the clarification. |
Yeah, sounds quite good 👍 |
Seems we have agreement based on @gnawux's proposal. Closing this resolved issue. |
rename cc-*.go to kata-*.go
HACK: The VmPath is not getting properly populated
Fix remove hotplug device
Merge #3 of kata-containers/runtime
- versions: bump firecracker version - clh: use http client - rootless: Disable vhost-net for rootless - compatoci: Add a SetLogger call - virtiofs: stop sandbox when virtiofsd quits - vc: Remove device when AddDevice encounters error - kernel: update to 4.19.83 - Cloud Hypervisor: driver update number 2 - vc: Use map to represent ignoredMounts - Fc comment - vc: Check return value from os.MkdirAll in virtiofsdArgs - vc: Drop Sandbox#Pause and Sandbox#Resume - vc: Use map built-in accessor to find container in Sandbox#GetContainer - Makefile: fix suspicious line - k8s: fix wrong number cpus after killing a container - vc: Utilize map for newMounts to speed up replaceOCIMountSource - vc: Sandbox#getAndSetSandboxBlockIndex shouldn't alter BlockIndex in case of error - virtcontainers: rename GetOCISpec to GetPatchedOCISpec - tracing: Unbreak tracing test - fc.go: Set firecracker log level to debug if hypervisor.enable_debug … - virtcontainers: honour ContainerConfig struct comment and don't save OCI spec - virtcontainers: improve algorithm to find containers - Merge kata-containers#3 of kata-containers/runtime - FC: extract error info from firecracker built-in log and metrics scheme - gitignore: include cloud hypervisor configuration toml - Respect containerd's debug config - Clh driver: removed hard-coded vsock contextid (cid) - vc: Persist file handle may leak in FS#ToDisk - vc: Clean up directories in case MkdirAll fails - vc: Restore sandbox state when there is error starting containers - vc: Persist file handle may leak in FS#FromDisk - sync fork after merge clh driver kata-containers#1 810c2c9 versions: bump firecracker version 0afeb52 clh: clh http unit test 42061f6 clh: cleanup VM dir c688a15 version: CH bump to master 9f15dd2 clh: remove cli builder f73723a clh: use http client 0babd38 rootless: Disable vhost-net for rootless 6010218 clh: Implement check() a10da3e vendor: update openapi deps 1836226 clh: generate client code dcac021 clh: Add Generation tools for API client abbb536 virtiofs: stop sandbox when virtiofsd quits 9c0872d vc: Remove device when AddDevice encounters error 67f203f compatoci: Add a SetLogger call bec46bb vc: Use map to represent ignoredMounts 628799a vc: Check return value from os.MkdirAll in virtiofsdArgs 9dd3f13 Makefile: Move the .git-commit: rule block to below the all: rule 7bcce3d Makefile: do not use tabs in if/else blocks 38224e8 vc: Use map built-in accessor to find container in Sandbox#GetContainer 544730b vc: Drop Sandbox#Pause and Sandbox#Resume d4be097 Makefile: fix suspicious line e8cc87b clh: basic/unit tests for clh driver 0697124 fc: update comments for startSandbox 3ef8f6c clh: fixes erroneous killing of virtiofsd 6af127f clh: improve driver logging for failed hypervisor c58e6f9 kernel: update to 4.19.86 b7731e9 virtcontainers: don't consider non-running container resources 43f0513 virtcontainers: update resources after adding container to sandbox 613fd0f virtcontainers: rename GetOCISpec to GetPatchedOCISpec 330cc72 tracing: Unbreak tracing test 191ee63 fc.go: Set fc log level to debug if hypervisor.enable_debug is true 336edf7 virtcontainers: honour ContainerConfig struct comment and not save Spec 7f67b9f virtcontainers: improve algorithm to find containers 0ac4355 gitignore: include cloud hypervisor configuration toml 1abe52a clh: removed hard-coded vsock contextid (cid) c833ac2 vc: BlockIndex should not be altered in case of error b8b6733 vc: Persist file handle may leak in FS#ToDisk 03478d4 vc: Clean up directories in case MkdirAll fails 51d7c23 shim: Respect containerd's debug config 93a0336 vc: Restore sandbox state when there is error starting containers 2331e87 vc: Persist file handle may leak in FS#FromDisk 9a4ee4f vc: Utilize map for newMounts to speed up replaceOCIMountSource daae1db log: extract error info from firecracker built-in log and metrics scheme Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
Now we have
logrus
andglog
as candidate, both are widely used in the golang world. We all agree the logrus are more flexible and powerful. However, glog is come from Google, and used by most of the kubernetes family projects.The question is, could we wrapped the log engine, which allows the users could select log engine if they import kata code as vendor?
The text was updated successfully, but these errors were encountered: