Bug 1420593 - [DOCS] There is no doc for the Openshift Service log level
Summary: [DOCS] There is no doc for the Openshift Service log level
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Michael Burke
QA Contact: Junqi Zhao
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-09 03:11 UTC by zhtang
Modified: 2020-05-14 15:37 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-10 13:29:54 UTC
Target Upstream Version:


Attachments (Terms of Use)
DO NOT USE (25.01 KB, application/vnd.oasis.opendocument.text)
2017-03-09 16:29 UTC, Michael Burke
mburke: review-
Details
Journalctl output from loglevel testing (25.02 KB, application/vnd.oasis.opendocument.text)
2017-03-09 16:35 UTC, Michael Burke
no flags Details
difference between level 0,1,2,3 (23.48 KB, application/vnd.oasis.opendocument.text)
2017-03-10 09:27 UTC, Junqi Zhao
no flags Details
difference between level 0,1,2,3, see this file (23.50 KB, application/vnd.oasis.opendocument.text)
2017-03-10 09:31 UTC, Junqi Zhao
no flags Details

Description zhtang 2017-02-09 03:11:38 UTC
Describe the issue: There is no doc for the Openshift Service log level. Customer is unable to know how many log levels we have and which number is refer to each log level. 

We do have the KCS [1] mentioned that. However, it seems the KCS is not right. According to the KCS, we have 5 log levels, but the kubernetes [2] has 10 log levels. And it seems we actually have 10 log levels according to [3].


Suggestions for improvement: Please help create the official documentation which introduces the log levels.

[1] https://access.redhat.com/solutions/2209351
[2] https://github.com/kubernetes/community/blob/master/contributors/devel/logging.md
[3] https://github.com/openshift/origin/issues/9052#issuecomment-222131851

Comment 3 Michael Burke 2017-02-13 18:51:43 UTC
Zhenxing --

Is the setting in the /etc/sysconfig/atomic-openshift-node or /etc/sysconfig/atomic-openshift-master files different from the setting here?

oc options
The following options can be passed to any command:
--loglevel=0: Set the level of log output (0-10)


Full output:
$ oc options
The following options can be passed to any command:

      --api-version='': DEPRECATED: The API version to use when talking to the server
      --as='': Username to impersonate for the operation.
      --certificate-authority='': Path to a cert. file for the certificate authority.
      --client-certificate='': Path to a client certificate file for TLS.
      --client-key='': Path to a client key file for TLS.
      --cluster='': The name of the kubeconfig cluster to use
      --config='': Path to the config file to use for CLI requests.
      --context='': The name of the kubeconfig context to use
      --insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
      --log-flush-frequency=5s: Maximum number of seconds between log flushes
      --loglevel=0: Set the level of log output (0-10)
      --logspec='': Set per module logging with file|pattern=LEVEL,...
      --match-server-version=false: Require server version to match client version
  -n, --namespace='': If present, the namespace scope for this CLI request.
      --server='': The address and port of the Kubernetes API server
      --token='': Bearer token for authentication to the API server.
      --user='': The name of the kubeconfig user to use

Comment 4 zhtang 2017-02-14 01:28:52 UTC
Hi Michael,

Thank you for your explanation.

I did not realize that.

Regards,
John

Comment 5 zhtang 2017-02-14 01:35:53 UTC
Hi Michael,

Before documenting all oc options, can you please let me know the official instruction of the log level first? As customer is currently looking for the information of log level.

Thanks,
John

Comment 6 zhtang 2017-02-14 02:05:41 UTC
Hi Michael,

I updated the previous comments before reading the email. So I did not see the discussion. 

According to Steve's reply, the log level in Openshift service is different with the one in oc options. 

If it is possible, can we document the log level in Openshift service first?

Regards,
John

Comment 22 Junqi Zhao 2017-03-07 02:29:08 UTC
@Michael,

We should confirm how many log levels should de listed in our documentation, if we just list 0,2,4,6,7,8, I think customers will be confused, they will ask why we don't have 1,3,5..and etc log levels.

Comment 24 Michael Burke 2017-03-08 17:33:00 UTC
(In reply to Junqi Zhao from comment #22)
> @Michael,
> 
> We should confirm how many log levels should de listed in our documentation,
> if we just list 0,2,4,6,7,8, I think customers will be confused, they will
> ask why we don't have 1,3,5..and etc log levels.

Hello --

According to an email from Clayton Coleman on February 10, for the loglevel setting in the /etc/sysconfig/atomic-openshift-master file, we are using logging based on the Kubernetes logging which has 5 levels:

"I wrote the Kube conventions, so yes, we're using them :)

0 is errors and warnings only
2 is "normal info"
4 is debugging 
6 is api level debugging (request / response)
8 is body level API debugging"

I am not sure how many loglevels are used with the oc options loglevel option. The oc options loglevel is outside the scope of this bug.

Comment 25 Junqi Zhao 2017-03-09 01:24:40 UTC
(In reply to Michael Burke from comment #24)
 
> According to an email from Clayton Coleman on February 10, for the loglevel
> setting in the /etc/sysconfig/atomic-openshift-master file, we are using
> logging based on the Kubernetes logging which has 5 levels:
> 
> "I wrote the Kube conventions, so yes, we're using them :)
> 
> 0 is errors and warnings only
> 2 is "normal info"
> 4 is debugging 
> 6 is api level debugging (request / response)
> 8 is body level API debugging"
> 
> I am not sure how many loglevels are used with the oc options loglevel
> option. The oc options loglevel is outside the scope of this bug.

Thanks for your explanation, I think we should tell customers we are using
logging based on the Kubernetes logging, so they will not confused why the log level is discontinuous, just my opinion

Comment 26 Michael Burke 2017-03-09 16:28:31 UTC
(In reply to Junqi Zhao from comment #25)
> (In reply to Michael Burke from comment #24)
>  
> > According to an email from Clayton Coleman on February 10, for the loglevel
> > setting in the /etc/sysconfig/atomic-openshift-master file, we are using
> > logging based on the Kubernetes logging which has 5 levels:
> > 
> > "I wrote the Kube conventions, so yes, we're using them :)
> > 
> > 0 is errors and warnings only
> > 2 is "normal info"
> > 4 is debugging 
> > 6 is api level debugging (request / response)
> > 8 is body level API debugging"
> > 
> > I am not sure how many loglevels are used with the oc options loglevel
> > option. The oc options loglevel is outside the scope of this bug.
> 
> Thanks for your explanation, I think we should tell customers we are using
> logging based on the Kubernetes logging, so they will not confused why the
> log level is discontinuous, just my opinion


I did some very basic testing of the loglevel setting and journalctl -r atomic-openshift-master.service output. See attachment loglevels.odt

I cannot tell the difference in loglevel 0, 1, 2, and 3. Maybe you can determine if the output is different?
loglevel 4 appears unique
loglevel 5 appears unique
loglevel 6 appears unique
loglevel 7 appears unique
loglevel 8 appears unique
loglevel 9 appears to be the same as 8
loglevel 10 appears to be the same as 8

Can you help me determine what the different log levels output?

Michael

Comment 27 Michael Burke 2017-03-09 16:29:42 UTC
Created attachment 1261627 [details]
DO NOT USE

Comment 28 Michael Burke 2017-03-09 16:35:04 UTC
Comment on attachment 1261627 [details]
DO NOT USE

DO NOT USE. WRONG FILE

Comment 29 Michael Burke 2017-03-09 16:35:54 UTC
Created attachment 1261628 [details]
Journalctl output from loglevel testing

Comment 30 Junqi Zhao 2017-03-10 09:26:32 UTC
@Michael,

I just list some difference in the attached file for level 0, 1, 2, 3.

Maybe when we run apps or projects on OCP, then it's clear to identify the difference.

I think we can do some researches and ask help from developers.

Comment 31 Junqi Zhao 2017-03-10 09:27:40 UTC
Created attachment 1261871 [details]
difference between level 0,1,2,3

Comment 32 Junqi Zhao 2017-03-10 09:30:25 UTC
Comment on attachment 1261871 [details]
difference between level 0,1,2,3

do not use

Comment 33 Junqi Zhao 2017-03-10 09:31:00 UTC
Created attachment 1261873 [details]
difference between level 0,1,2,3, see this file

Comment 38 Michael Burke 2017-03-27 14:34:13 UTC
Steve --

Comment 39 Michael Burke 2017-03-27 14:35:50 UTC
Hello --

Can someone take a look at:
http://file.rdu.redhat.com/~mburke/logfile/master_node_configuration.html#config-logging-levels

Based on Steve's comments in Comment 37 

Michael

Comment 40 Junqi Zhao 2017-03-29 03:24:05 UTC
I think there is only one part needs to be changed, other parts are look good to me.
***************************************************************************
To change the logging level:
2. Enter a value from the Log Level Options table below in the OPTIONS=--loglevel= field.

***************************************************************************
There is not Log Level Options table under this step, so maybe you should change to:
Enter a value from the Log Level Options table in the OPTIONS=--loglevel= field.

and we should mention that the following table is Log Level Options table

    0 is errors and warnings only

    2 is "normal info"

    4 is debugging

    6 is api level debugging (request / response)

    8 is body level API debugging

Comment 42 Michael Burke 2017-03-29 16:32:00 UTC
(In reply to Junqi Zhao from comment #40)
> I think there is only one part needs to be changed, other parts are look
> good to me.
> ***************************************************************************
> To change the logging level:
> 2. Enter a value from the Log Level Options table below in the
> OPTIONS=--loglevel= field.
> 
> ***************************************************************************
> There is not Log Level Options table under this step, so maybe you should
> change to:
> Enter a value from the Log Level Options table in the OPTIONS=--loglevel=
> field.
> 
> and we should mention that the following table is Log Level Options table
> 
>     0 is errors and warnings only
> 
>     2 is "normal info"
> 
>     4 is debugging
> 
>     6 is api level debugging (request / response)
> 
>     8 is body level API debugging

Thank you for catching this error. Made the changes.
http://file.rdu.redhat.com/~mburke/logfile/master_node_configuration.html#config-logging-levels

Comment 44 Junqi Zhao 2017-03-30 01:17:41 UTC
The documentation for "Configuring Logging Levels" looks good to me. but I have a modest proposalfor 
http://file.rdu.redhat.com/~mburke/logfile/mburke-bug-1420593/install_config/install/advanced_install.html#configuring-cluster-variables

When I checked the Purpose field of "debug_level" in "Table 2. Cluster Variables ", I could not see the full description, I thought it maybe related to my screen resolution, but when I scrolled down, I found there was one horizontal scroll bar,
then if I want to see the full description of "debug_level", I have to scroll down to the horizontal scroll bar then move right and then scroll up to see the whole description, I think it is not user friendly.


So, I think you should make the line shorter and avoid using the horizontal scroll bar

Comment 46 openshift-github-bot 2017-03-31 16:07:51 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/c6b0cf72f8e44e9dc0781b289868bdc244a2f6d8
Added new  section for log level, per Bug 1420593

edits from peer review

edits from peer review

https://github.com/openshift/openshift-docs/commit/e698b256cd006f6a39ad219b0f4b6b0ae52d9f53
Merge pull request #4055 from mburke5678/mburke-bug-1420593

Bug 1420593 New section on log_level config setting


Note You need to log in before you can comment on or make changes to this bug.