Skip to content

Conversation

@XanthosXanthopoulos
Copy link
Collaborator

Issue and/or context: SOMA-820

Changes:
This PR includes:

  • Minor refactor of logger implementation
  • Move logging functionality to separate object library

Notes for Reviewer:
This PR is the first from a series focused on separating non SOMA specific functionality to a separate object library.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.36%. Comparing base (b521dae) to head (b14f052).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4377      +/-   ##
==========================================
- Coverage   86.36%   86.36%   -0.01%     
==========================================
  Files         139      139              
  Lines       21093    21093              
  Branches       15       15              
==========================================
- Hits        18218    18216       -2     
- Misses       2875     2877       +2     
Flag Coverage Δ
python 89.02% <ø> (-0.03%) ⬇️
r 84.99% <72.72%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 89.02% <ø> (-0.03%) ⬇️
libtiledbsoma 77.24% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@XanthosXanthopoulos XanthosXanthopoulos changed the title [WIP][c++] Move logging functionality to a separate object library [c++] Move logging functionality to a separate object library Jan 20, 2026
@XanthosXanthopoulos XanthosXanthopoulos marked this pull request as ready for review January 20, 2026 16:09
Copy link
Collaborator

@jp-dark jp-dark left a comment

Choose a reason for hiding this comment

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

Two small optional comments, but otherwise looks good.

Comment on lines 42 to 44
inline constexpr std::string_view LOG_PATTERN{"%^[%Y-%m-%d %H:%M:%S.%e] [%n] [Process: %P] [Thread: %t] [%l] %v%$"};
inline constexpr std::string_view CONSOLE_LOGGER{"tiledbsoma"};
inline constexpr std::string_view FILE_LOGGER{"tiledbsoma-file"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the value in switching these from const std::string to inline constexpr std::string_view? The previous method seems more direct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Depending on the string length using a std::string you may have a heap allocation. In this case this is not relevant because LOG_PATTERN is passed by value to spdlog so any optimization is ineffective. i will revert to the old method.

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