Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

rgw/sfs: standardize log levels #239

Merged
merged 5 commits into from
Nov 6, 2023

Conversation

jecluis
Copy link
Member

@jecluis jecluis commented Oct 25, 2023

Fixes: aquarist-labs/s3gw#781

Signed-off-by: Joao Eduardo Luis <[email protected]>

Signed-off-by: Joao Eduardo Luis <[email protected]>
When building a preamble, clang-tidy really dislikes header recursion
without '#pragma once'. Seems like it doesn't observe the header guards.

Signed-off-by: Joao Eduardo Luis <[email protected]>
@jecluis jecluis added kind/enhancement Change that positively impacts existing code area/rgw-sfs RGW & SFS related kind/quality Quality improvements, Refactoring, Automation via CI, E2E, Integration, CLI or REST API labels Oct 25, 2023
@jecluis jecluis added this to the v0.23.0 milestone Oct 25, 2023
@jecluis jecluis requested review from irq0 and 0xavi0 October 25, 2023 22:41
@jecluis jecluis marked this pull request as draft October 25, 2023 22:41
Signed-off-by: Joao Eduardo Luis <[email protected]>
@jecluis jecluis force-pushed the wip-sfs-log-subsys branch from 2f1ac7a to 8dcd871 Compare October 26, 2023 11:36
Comment on lines +55 to +79
#define lsfs_err(_dpp) lsfs_dout(_dpp, SFS_LOG_ERROR)
#define lsfs_err_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_ERROR, _whom)

#define lsfs_startup(_dpp) lsfs_dout(_dpp, SFS_LOG_STARTUP)
#define lsfs_startup_for(_dpp, _whom) \
lsfs_dout_for(_dpp, SFS_LOG_STARTUP, _whom)

#define lsfs_shutdown(_dpp) lsfs_dout(_dpp, SFS_LOG_SHUTDOWN)
#define lsfs_shutdown_for(_dpp, _whom) \
lsfs_dout_for(_dpp, SFS_LOG_SHUTDOWN, _whom)

#define lsfs_warn(_dpp) lsfs_dout(_dpp, SFS_LOG_WARN)
#define lsfs_warn_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_WARN, _whom)

#define lsfs_info(_dpp) lsfs_dout(_dpp, SFS_LOG_INFO)
#define lsfs_info_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_INFO, _whom)

#define lsfs_verb(_dpp) lsfs_dout(_dpp, SFS_LOG_VERBOSE)
#define lsfs_verb_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_VERBOSE, _whom)

#define lsfs_debug(_dpp) lsfs_dout(_dpp, SFS_LOG_DEBUG)
#define lsfs_debug_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_DEBUG, _whom)

#define lsfs_trace(_dpp) lsfs_dout(_dpp, SFS_LOG_TRACE)
#define lsfs_trace_for(_dpp, _whom) lsfs_dout_for(_dpp, SFS_LOG_TRACE, _whom)
Copy link
Member

Choose a reason for hiding this comment

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

❤️

#define SFS_LOG_VERBOSE 10
#define SFS_LOG_DEBUG 15
#define SFS_LOG_TRACE 20
#define SFS_LOG_MEGA_TRACE 30
Copy link
Member

Choose a reason for hiding this comment

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

I like the name, but can't think of a use for something above trace.

@irq0
Copy link
Member

irq0 commented Oct 31, 2023

I like it!

@jecluis jecluis marked this pull request as ready for review November 2, 2023 06:54
@jecluis jecluis changed the title [DNM] rgw/sfs: standardize log levels rgw/sfs: standardize log levels Nov 2, 2023
Copy link
Member

@irq0 irq0 left a comment

Choose a reason for hiding this comment

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

LGTM

Optional: Remove SFS_LOG_MEGA_TRACE, because no use case at the moment

@jecluis
Copy link
Member Author

jecluis commented Nov 3, 2023

Optional: Remove SFS_LOG_MEGA_TRACE, because no use case at the moment

I like it too much, and I'm sure someone will at some point use it.

Copy link

@0xavi0 0xavi0 left a comment

Choose a reason for hiding this comment

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

lg2m

@jecluis jecluis merged commit 0aa6b88 into aquarist-labs:s3gw Nov 6, 2023
6 checks passed
@jecluis jecluis deleted the wip-sfs-log-subsys branch November 6, 2023 04:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/rgw-sfs RGW & SFS related kind/enhancement Change that positively impacts existing code kind/quality Quality improvements, Refactoring, Automation via CI, E2E, Integration, CLI or REST API
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Standardize sfs log levels
3 participants