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

common: introduce logging level HARK #6020

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

grom72
Copy link
Contributor

@grom72 grom72 commented Feb 22, 2024

CORE_LOG_HARK together with CORE_LOG_LEVEL_HARK are used for messages that should always be visible in the logging system like library version number, Valgrind compilation status and other basic library information.


This change is Reviewable

@grom72 grom72 added sprint goal This pull request is part of the ongoing sprint no changelog Add to skip the changelog check on your pull request labels Feb 22, 2024
@grom72 grom72 requested a review from janekmi February 22, 2024 10:57
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8ff6a12) 70.06% compared to head (2acd889) 70.03%.

❗ Current head 2acd889 differs from pull request most recent head 2836433. Consider uploading reports for the commit 2836433 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6020      +/-   ##
==========================================
- Coverage   70.06%   70.03%   -0.03%     
==========================================
  Files         133      133              
  Lines       19570    19562       -8     
  Branches     3266     3263       -3     
==========================================
- Hits        13711    13701      -10     
- Misses       5859     5861       +2     

@grom72 grom72 marked this pull request as ready for review February 22, 2024 11:39
CORE_LOG_HARK together with CORE_LOG_LEVEL_HARK are used for
messages that should always be visible in the logging system
like library version number, Valgrind compilation status
and other basic library information.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

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

Reviewed 15 of 15 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @grom72)


src/core/log_default.c line 42 at r1 (raw file):

	[CORE_LOG_LEVEL_NOTICE]		= LOG_NOTICE,
	[CORE_LOG_LEVEL_INFO]		= LOG_INFO,
	[CORE_LOG_LEVEL_DEBUG]		= LOG_DEBUG,

I prefer to keep indices in order.

Suggestion:

	[CORE_LOG_LEVEL_HARK]		= LOG_NOTICE,
	[CORE_LOG_LEVEL_FATAL]		= LOG_CRIT,
	[CORE_LOG_LEVEL_ERROR]		= LOG_ERR,
	[CORE_LOG_LEVEL_WARNING]	= LOG_WARNING,
	[CORE_LOG_LEVEL_NOTICE]		= LOG_NOTICE,
	[CORE_LOG_LEVEL_INFO]		= LOG_INFO,
	[CORE_LOG_LEVEL_DEBUG]		= LOG_DEBUG,

src/core/log_internal.h line 25 at r1 (raw file):

enum core_log_level {
	/* all messages will be suppressed except basic library info */

The reference to suppression seems out of place. It is just a level as any other.

Suggestion:

only basic library info

src/include/libpmemobj/log.h line 21 at r1 (raw file):

 */
enum pmemobj_log_level {
	/* all messages will be suppressed except basic library info */

.


src/include/libpmemobj/log.h line 90 at r1 (raw file):

 *
 * Available threshold levels are defined by enum log_level:
 * - PMEMOBJ_LOG_LEVEL_HARK - all messages will be suppressed except lib info

.

Copy link
Contributor Author

@grom72 grom72 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 12 of 15 files reviewed, 4 unresolved discussions (waiting on @janekmi)


src/core/log_default.c line 42 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

I prefer to keep indices in order.

Done.


src/core/log_internal.h line 25 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

The reference to suppression seems out of place. It is just a level as any other.

Done.


src/include/libpmemobj/log.h line 21 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

.

Done.


src/include/libpmemobj/log.h line 90 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

.

Done.

Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @grom72)

@janekmi janekmi merged commit 38d414e into pmem:master Feb 22, 2024
6 checks passed
@grom72 grom72 deleted the core-log-level-hark branch February 23, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Add to skip the changelog check on your pull request sprint goal This pull request is part of the ongoing sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants