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

Custom LoggerFactory for log4cxx #376

Open
izumo27 opened this issue Dec 26, 2023 · 2 comments
Open

Custom LoggerFactory for log4cxx #376

izumo27 opened this issue Dec 26, 2023 · 2 comments

Comments

@izumo27
Copy link
Contributor

izumo27 commented Dec 26, 2023

FileLoggerFactory simply outputs logs to a single file.
If users want to rotate log files, they need to implement custom LoggerFactory by themselves.
Log4cxxLogger was deleted in #283, but this is useful for users.

So I would like to recover Log4cxxLogger.
I would not create specialized methods for Log4cxxLogger as there used to be, but would like to make it one of the options in the same category as ConsoleLoggerFactory and FileLoggerFactory.
https://github.com/apache/pulsar-client-cpp/pull/283/files#diff-abb02af9369945477ebc3329b299544ba67e214ac3f36c55b1f9e27f68469abf
If we want to avoid embedding it as a build option, we can separate the client and logger packages.

@BewareMyPower
Copy link
Contributor

It's better not to bind the library with a specific logging framework.

It make sense to me to add back the LoggerFactory for log4cxx. But it's better to add them to a different directory, e.g.

include/pulsar/logging/Log4cxxLogger.h

BTW, I think it should be header-only. Otherwise, we need to bind the log4cxx dependency with pulsar-client-cpp.

@BewareMyPower
Copy link
Contributor

In future, we can add more other logging library integrations like spdlog

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