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

set C-SDK log format in ZET #643

Open
qrkourier opened this issue May 4, 2023 · 1 comment
Open

set C-SDK log format in ZET #643

qrkourier opened this issue May 4, 2023 · 1 comment

Comments

@qrkourier
Copy link
Member

C-SDK logs ss.mmm offset from process startup which is fine when consumed by journald or a container runtime that computes human-friendly timestamps. There are other situations when a timestamp is needed, such as when the tunneler is running attached to stdin (interactively) for troubleshooting purposes.

It is possible to override this by inheriting env var ZITI_TIME_FORMAT=utc, but we need to meet the tunneler user's expectation to configure logging with the CLI, not only an env var. Environment variables are not readily discovered by the CLI user.

When stdin is a tty ZET should set ZITI_TIME_FORMAT=utc for C-SDK by default. Additionally, ZET should honor short option -u and long option --utc, emulating GNU Date, to emit UTC timestamps instead of or in addition to seconds since startup.

@qrkourier
Copy link
Member Author

This problem still exists in 0.22.20. ziti-edge-tunnel run and run-host emit seconds since startup when stdin is a tty, which is not useful and there's no possibility of the seconds offset being interpreted as a datetime.

ZET should emit a local or UTC datetime when stdin is a tty.

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

No branches or pull requests

1 participant