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

pmem: add pmem_log_set_function function + UT #6059

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

osalyk
Copy link
Contributor

@osalyk osalyk commented Mar 20, 2024

This change is Reviewable

@osalyk osalyk 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 Mar 20, 2024
@osalyk osalyk requested review from grom72 and janekmi March 20, 2024 08:08
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.12%. Comparing base (204bdff) to head (ef81768).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6059      +/-   ##
==========================================
- Coverage   70.13%   70.12%   -0.01%     
==========================================
  Files         133      133              
  Lines       19565    19568       +3     
  Branches     3261     3261              
==========================================
+ Hits        13721    13723       +2     
- Misses       5844     5845       +1     

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 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @grom72)


src/include/libpmem.h line 114 at r1 (raw file):

	/* debug info e.g. write operation dump */
	PMEM_LOG_LEVEL_DEBUG,
};

I assume #6057 will be landed first. So, I do not repeat myself on this bit.

Code quote:

/*
 * Available log levels. Log levels are used in the logging API calls
 * to indicate logging message severity. Log levels are also used
 * to define thresholds for the logging.
 */
enum pmem_log_level {
	/* only basic library info */
	PMEM_LOG_LEVEL_HARK,
	/* an error that causes the library to stop working immediately */
	PMEM_LOG_LEVEL_FATAL,
	/* an error that causes the library to stop working properly */
	PMEM_LOG_LEVEL_ERROR,
	/* an errors that could be handled in the upper level */
	PMEM_LOG_LEVEL_WARNING,
	/* non-massive info mainly related to public API function completions */
	PMEM_LOG_LEVEL_NOTICE,
	/* massive info e.g. every write operation indication */
	PMEM_LOG_LEVEL_INFO,
	/* debug info e.g. write operation dump */
	PMEM_LOG_LEVEL_DEBUG,
};

Copy link
Contributor

@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.

:lgtm:

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

@janekmi janekmi merged commit 457c61d into pmem:master Mar 20, 2024
9 checks passed
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.

3 participants