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

CA-296532: mpathalert log spam #49

Merged
merged 1 commit into from
Sep 7, 2018

Conversation

minli1
Copy link
Member

@minli1 minli1 commented Sep 6, 2018

Disable debug log level for brand 'mscgen'

Signed-off-by: Min Li min.li1@citrix.com

@@ -21,6 +21,8 @@ open D

module E = Debug.Make(struct let name = "mscgen" end)

let initialize_logging = Debug.disable ~level:Syslog.Debug "mscgen"
Copy link
Member

Choose a reason for hiding this comment

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

Do you forget the () parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated 👍

@@ -371,6 +373,7 @@ module Protocol = functor(F: FORMAT) -> struct
(* Caution: req can contain sensitive information such as passwords in its parameters,
* so we should not log the parameters or a string representation of the whole thing.
* The name should be safe though, e.g. req.Rpc.name when F is XMLRPC. *)
initialize_logging;
Copy link
Contributor

Choose a reason for hiding this comment

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

initialize_logging needs to be a function if you want to call it like this. Currently this is just a unit value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated, thanks.

@@ -21,6 +21,8 @@ open D

module E = Debug.Make(struct let name = "mscgen" end)

let initialize_logging () = Debug.disable ~level:Syslog.Debug "mscgen"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work if we do it once here:

let () = Debug.disable ~level:Syslog.Debug "mscgen"

That would be more efficient than calling this in every rpc call.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good point. I will change and test. thanks.

@minli1 minli1 force-pushed the private/minl1/CA-296532 branch 2 times, most recently from 4881643 to 9474829 Compare September 6, 2018 14:52
Disable Debug Level for brand 'mscgen'

Signed-off-by: Min Li <min.li1@citrix.com>
Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

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

After the last update I think this looks good.

@minli1
Copy link
Member Author

minli1 commented Sep 7, 2018

Test passed, help to merge please. Thanks.

@lindig lindig merged commit 3ea24f6 into xapi-project:master Sep 7, 2018
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

Successfully merging this pull request may close these issues.

6 participants