containerd / accelerated-container-image

A production-ready remote container image format (overlaybd) and snapshotter based on block-device.
Apache License 2.0
409 stars 75 forks source link

Overlaybd log output to stdout or journalctl logs #216

Closed shuaichang closed 1 year ago

shuaichang commented 1 year ago

What is the version of your Accelerated Container Image

Overlaybd 0.6.12

What would you like to be added?

In some cases it is desirable to output overlaybd logs into stdout and get logs managed by journalctl so it's a consistent operational experience. Is this something overlaybd could support?

Why is this needed for Accelerated Container Image?

For operational consistency.

Are you willing to submit PRs to contribute to this feature?

shuaichang commented 1 year ago

Verified that commenting this line out will redirect logs to stdout. Is it possible to make this as a config for log destination (e.g. file|stdout)

image
lihuiba commented 1 year ago

It's better to use LOG_ERRNO_RETURN instead of LOG_ERROR_RETURN, so that error string will be logged as well.

lihuiba commented 1 year ago

@shuaichang And this issue is more fit for overlaybd.

shuaichang commented 1 year ago

Thanks, I think we are unblocked with the suggestion to use the global "logPath":"" as a workaround, we can close this issue now.