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

Improve log support #205

Merged
merged 2 commits into from
Nov 29, 2017
Merged

Conversation

Random-Liu
Copy link
Contributor

Add crictl logs --timestamps and crictl logs --since.

# crictl logs 4ec09ff44b31b -t
2017-11-29T00:45:40.979020878Z I1129 00:45:40.978789       1 dns.go:48] version: 1.14.6-3-gc36cb11
2017-11-29T00:45:40.979688558Z I1129 00:45:40.979607       1 server.go:69] Using configuration read from directory: /kube-dns-config with period 10s
2017-11-29T00:45:40.979715803Z I1129 00:45:40.979666       1 server.go:112] FLAG: --alsologtostderr="false"
2017-11-29T00:45:40.979723152Z I1129 00:45:40.979678       1 server.go:112] FLAG: --config-dir="/kube-dns-config"
2017-11-29T00:45:40.979727544Z I1129 00:45:40.979683       1 server.go:112] FLAG: --config-map=""
2017-11-29T00:45:40.97973059Z I1129 00:45:40.979685       1 server.go:112] FLAG: --config-map-namespace="kube-system"
2017-11-29T00:45:40.979733094Z I1129 00:45:40.979688       1 server.go:112] FLAG: --config-period="10s"
2017-11-29T00:45:40.979735463Z I1129 00:45:40.979692       1 server.go:112] FLAG: --dns-bind-address="0.0.0.0"
2017-11-29T00:45:40.97973782Z I1129 00:45:40.979694       1 server.go:112] FLAG: --dns-port="10053"
2017-11-29T00:45:40.979740223Z I1129 00:45:40.979699       1 server.go:112] FLAG: --domain="cluster.local."
2017-11-29T00:45:40.979745273Z I1129 00:45:40.979704       1 server.go:112] FLAG: --federations=""
2017-11-29T00:45:40.979748832Z I1129 00:45:40.979713       1 server.go:112] FLAG: --healthz-port="8081"
2017-11-29T00:45:40.979751124Z I1129 00:45:40.979716       1 server.go:112] FLAG: --initial-sync-timeout="1m0s"
2017-11-29T00:45:40.979753298Z I1129 00:45:40.979719       1 server.go:112] FLAG: --kube-master-url=""
2017-11-29T00:45:40.979755554Z I1129 00:45:40.979723       1 server.go:112] FLAG: --kubecfg-file=""
2017-11-29T00:45:40.979757897Z I1129 00:45:40.979725       1 server.go:112] FLAG: --log-backtrace-at=":0"
2017-11-29T00:45:40.979760148Z I1129 00:45:40.979735       1 server.go:112] FLAG: --log-dir=""
2017-11-29T00:45:40.979818834Z I1129 00:45:40.979738       1 server.go:112] FLAG: --log-flush-frequency="5s"
2017-11-29T00:45:40.979833334Z I1129 00:45:40.979741       1 server.go:112] FLAG: --logtostderr="true"
2017-11-29T00:45:40.979837113Z I1129 00:45:40.979743       1 server.go:112] FLAG: --nameservers=""
2017-11-29T00:45:40.979839954Z I1129 00:45:40.979746       1 server.go:112] FLAG: --stderrthreshold="2"
2017-11-29T00:45:40.9798422Z I1129 00:45:40.979749       1 server.go:112] FLAG: --v="2"
2017-11-29T00:45:40.979845645Z I1129 00:45:40.979752       1 server.go:112] FLAG: --version="false"
2017-11-29T00:45:40.979847933Z I1129 00:45:40.979761       1 server.go:112] FLAG: --vmodule=""
2017-11-29T00:45:40.979951033Z I1129 00:45:40.979842       1 server.go:194] Starting SkyDNS server (0.0.0.0:10053)
2017-11-29T00:45:40.980343203Z I1129 00:45:40.980248       1 server.go:213] Skydns metrics enabled (/metrics:10055)
2017-11-29T00:45:40.980354902Z I1129 00:45:40.980266       1 dns.go:146] Starting endpointsController
2017-11-29T00:45:40.980359014Z I1129 00:45:40.980269       1 dns.go:149] Starting serviceController
2017-11-29T00:45:40.980456917Z I1129 00:45:40.980376       1 logs.go:41] skydns: ready for queries on cluster.local. for tcp://0.0.0.0:10053 [rcache 0]
2017-11-29T00:45:40.980464531Z I1129 00:45:40.980401       1 logs.go:41] skydns: ready for queries on cluster.local. for udp://0.0.0.0:10053 [rcache 0]
2017-11-29T00:45:41.480711636Z I1129 00:45:41.480507       1 dns.go:170] Initialized services and endpoints from apiserver
2017-11-29T00:45:41.480737356Z I1129 00:45:41.480557       1 server.go:128] Setting up Healthz Handler (/readiness)
2017-11-29T00:45:41.48078114Z I1129 00:45:41.480571       1 server.go:133] Setting up cache handler (/cache)
2017-11-29T00:45:41.480785328Z I1129 00:45:41.480576       1 server.go:119] Status HTTP port 8081
# crictl logs 4ec09ff44b31b --since 2017-11-29T00:45:40.979748832Z -t
2017-11-29T00:45:40.979748832Z I1129 00:45:40.979713       1 server.go:112] FLAG: --healthz-port="8081"
2017-11-29T00:45:40.979751124Z I1129 00:45:40.979716       1 server.go:112] FLAG: --initial-sync-timeout="1m0s"
2017-11-29T00:45:40.979753298Z I1129 00:45:40.979719       1 server.go:112] FLAG: --kube-master-url=""
2017-11-29T00:45:40.979755554Z I1129 00:45:40.979723       1 server.go:112] FLAG: --kubecfg-file=""
2017-11-29T00:45:40.979757897Z I1129 00:45:40.979725       1 server.go:112] FLAG: --log-backtrace-at=":0"
2017-11-29T00:45:40.979760148Z I1129 00:45:40.979735       1 server.go:112] FLAG: --log-dir=""
2017-11-29T00:45:40.979818834Z I1129 00:45:40.979738       1 server.go:112] FLAG: --log-flush-frequency="5s"
2017-11-29T00:45:40.979833334Z I1129 00:45:40.979741       1 server.go:112] FLAG: --logtostderr="true"
2017-11-29T00:45:40.979837113Z I1129 00:45:40.979743       1 server.go:112] FLAG: --nameservers=""
2017-11-29T00:45:40.979839954Z I1129 00:45:40.979746       1 server.go:112] FLAG: --stderrthreshold="2"
2017-11-29T00:45:40.9798422Z I1129 00:45:40.979749       1 server.go:112] FLAG: --v="2"
2017-11-29T00:45:40.979845645Z I1129 00:45:40.979752       1 server.go:112] FLAG: --version="false"
2017-11-29T00:45:40.979847933Z I1129 00:45:40.979761       1 server.go:112] FLAG: --vmodule=""
2017-11-29T00:45:40.979951033Z I1129 00:45:40.979842       1 server.go:194] Starting SkyDNS server (0.0.0.0:10053)
2017-11-29T00:45:40.980343203Z I1129 00:45:40.980248       1 server.go:213] Skydns metrics enabled (/metrics:10055)
2017-11-29T00:45:40.980354902Z I1129 00:45:40.980266       1 dns.go:146] Starting endpointsController
2017-11-29T00:45:40.980359014Z I1129 00:45:40.980269       1 dns.go:149] Starting serviceController
2017-11-29T00:45:40.980456917Z I1129 00:45:40.980376       1 logs.go:41] skydns: ready for queries on cluster.local. for tcp://0.0.0.0:10053 [rcache 0]
2017-11-29T00:45:40.980464531Z I1129 00:45:40.980401       1 logs.go:41] skydns: ready for queries on cluster.local. for udp://0.0.0.0:10053 [rcache 0]
2017-11-29T00:45:41.480711636Z I1129 00:45:41.480507       1 dns.go:170] Initialized services and endpoints from apiserver
2017-11-29T00:45:41.480737356Z I1129 00:45:41.480557       1 server.go:128] Setting up Healthz Handler (/readiness)
2017-11-29T00:45:41.48078114Z I1129 00:45:41.480571       1 server.go:133] Setting up cache handler (/cache)
2017-11-29T00:45:41.480785328Z I1129 00:45:41.480576       1 server.go:119] Status HTTP port 8081

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 29, 2017
Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2017
@feiskyer feiskyer merged commit 80a7c13 into kubernetes-sigs:master Nov 29, 2017
@Random-Liu Random-Liu deleted the improve-log-support branch May 31, 2018 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants