Skip to content

Conversation

@moderakh
Copy link
Contributor

@moderakh moderakh commented Jan 2, 2020

Performance logging guideline.
This PR covers the following aspects in the hot path:

  1. If constructing logging message is expensive, that should be guarded by if (logger.isDebugEnabled())
  2. don't invoke toString() on objects passed to logger as it is not needed.

@moderakh
Copy link
Contributor Author

moderakh commented Jan 2, 2020

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

lgtm

@moderakh moderakh merged commit 1ae4b5d into feature/cosmos/v4 Jan 3, 2020
@weshaggard weshaggard deleted the users/moderakh/v4/logging-perf branch February 3, 2020 17:02
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.

3 participants