diff --git a/docs/troubleshooting/other-troubleshooting-tips/logging.md b/docs/troubleshooting/other-troubleshooting-tips/logging.md index 1f1df93a1b8..3cf2967d7e3 100644 --- a/docs/troubleshooting/other-troubleshooting-tips/logging.md +++ b/docs/troubleshooting/other-troubleshooting-tips/logging.md @@ -13,7 +13,9 @@ The following log levels are used in Rancher: ### How to configure a log level #### Kubernetes install + * Configure debug log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -24,6 +26,7 @@ $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` * Configure info log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -33,7 +36,9 @@ OK ``` #### Docker Install + * Configure debug log level + ``` $ docker exec -ti loglevel --set debug OK @@ -41,6 +46,7 @@ $ docker logs -f ``` * Configure info log level + ``` $ docker exec -ti loglevel --set info OK diff --git a/versioned_docs/version-2.0-2.4/troubleshooting/other-troubleshooting-tips/logging.md b/versioned_docs/version-2.0-2.4/troubleshooting/other-troubleshooting-tips/logging.md index 9ac12aa1356..0d0ab290de5 100644 --- a/versioned_docs/version-2.0-2.4/troubleshooting/other-troubleshooting-tips/logging.md +++ b/versioned_docs/version-2.0-2.4/troubleshooting/other-troubleshooting-tips/logging.md @@ -12,8 +12,9 @@ The following log levels are used in Rancher: ### How to configure a log level -* Kubernetes install - * Configure debug log level +#### Kubernetes install +* Configure debug log level + ``` $ KUBECONFIG=./kube_config_rancher-cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -23,7 +24,8 @@ OK $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` - * Configure info log level +* Configure info log level + ``` $ KUBECONFIG=./kube_config_rancher-cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -32,15 +34,18 @@ OK OK ``` -* Docker Install - * Configure debug log level +#### Docker Install + +* Configure debug log level + ``` $ docker exec -ti loglevel --set debug OK $ docker logs -f ``` - * Configure info log level +* Configure info log level + ``` $ docker exec -ti loglevel --set info OK diff --git a/versioned_docs/version-2.5/troubleshooting/other-troubleshooting-tips/logging.md b/versioned_docs/version-2.5/troubleshooting/other-troubleshooting-tips/logging.md index 89bfb3098db..3cf2967d7e3 100644 --- a/versioned_docs/version-2.5/troubleshooting/other-troubleshooting-tips/logging.md +++ b/versioned_docs/version-2.5/troubleshooting/other-troubleshooting-tips/logging.md @@ -12,8 +12,10 @@ The following log levels are used in Rancher: ### How to configure a log level -* Kubernetes install - * Configure debug log level +#### Kubernetes install + +* Configure debug log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -23,7 +25,8 @@ OK $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` - * Configure info log level +* Configure info log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -32,15 +35,18 @@ OK OK ``` -* Docker Install - * Configure debug log level +#### Docker Install + +* Configure debug log level + ``` $ docker exec -ti loglevel --set debug OK $ docker logs -f ``` - * Configure info log level +* Configure info log level + ``` $ docker exec -ti loglevel --set info OK diff --git a/versioned_docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md b/versioned_docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md index 89bfb3098db..3cf2967d7e3 100644 --- a/versioned_docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md +++ b/versioned_docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md @@ -12,8 +12,10 @@ The following log levels are used in Rancher: ### How to configure a log level -* Kubernetes install - * Configure debug log level +#### Kubernetes install + +* Configure debug log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -23,7 +25,8 @@ OK $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` - * Configure info log level +* Configure info log level + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -32,15 +35,18 @@ OK OK ``` -* Docker Install - * Configure debug log level +#### Docker Install + +* Configure debug log level + ``` $ docker exec -ti loglevel --set debug OK $ docker logs -f ``` - * Configure info log level +* Configure info log level + ``` $ docker exec -ti loglevel --set info OK