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

some comments on the logger implemenetaiton #1

Open
fnrizzi opened this issue Jan 27, 2025 · 1 comment
Open

some comments on the logger implemenetaiton #1

fnrizzi opened this issue Jan 27, 2025 · 1 comment
Assignees

Comments

@fnrizzi
Copy link
Member

fnrizzi commented Jan 27, 2025

https://github.com/Pressio/pressio-log/blob/main/include/pressio-log/logger/logger.hpp

  • we are missing move assign and move constructor

// Delete copy and assignment ops
Logger(Logger &other) = delete;
void operator=(const Logger &) = delete;

  • we need to write a better explanation of the pattern used here

// Return singleton instance of PressioLogger
static std::shared_ptr<Logger> PressioLogger() {
static std::shared_ptr<Logger> instance(new Logger());
return instance;
}

so that if we read this later or if someone else picks this up, they know what is going on here.
This is a good page to either reference or take some things from: https://blog.mbedded.ninja/programming/languages/c-plus-plus/magic-statics/

@cwschilly
Copy link
Contributor

This work has been added to main

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

No branches or pull requests

2 participants