Skip to content

Conversation

@lbenc135
Copy link
Contributor

@lbenc135 lbenc135 commented Jul 25, 2020

Motivation

Currently the log4cxx support is broken because of a recent refactor.

Modifications

Fixed the Log4Cxx logger refactor.

Verifying this change

  • Make sure that the change passes the CI checks.

This is a trivial change.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: no

Documentation

  • Does this pull request introduce a new feature? no

@merlimat
Copy link
Contributor

@lbenc135 the CMake flag was meant so that you can decide to use Log4Cxx. It's not a good idea to have it enabled by default, since on many platforms Log4Cxx can be very complicated to install (because of its dependencies).

@merlimat
Copy link
Contributor

just do cmake . -DUSE_LOG4CXX=ON

@lbenc135
Copy link
Contributor Author

@merlimat I see, thanks for the explanation. Does that mean that I can't use the default distribution (from PyPI for Python) and I have to build my own from source?

Should I maybe investigate other approaches to control logging? Maybe we can do something similar to what the Kafka client does - create a logger PyObject (to fix #4234). Or we can add a method/argument on the client for controlling the log level.

@merlimat
Copy link
Contributor

@lbenc135 There was an attempt to expose the logger in Python, so that you could be able to plug a Python function there. It was in #6113, though it was later reverted because of some other issues in #6174. I think that change should be revived

@lbenc135 lbenc135 changed the title Enable Log4cxx support Fix Log4cxx support Jul 30, 2020
@lbenc135
Copy link
Contributor Author

@merlimat I revived the change here #7713 so please take a look if you can.

I reverted the CMake flag here and left only the refactoring fixes. Not sure why the CI failed though.

@Giaco9
Copy link

Giaco9 commented Jun 1, 2021

Hi everyone, any news on this issue? We would like to configure the python logger in version prior to 2.8. Would this pull request make it possible? Also, this pull request #7838 seems to be helpful, which one will be merged? Is any help needed?

Thank you

Giacomo

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

@lbenc135:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@tisonkun
Copy link
Member

tisonkun commented Dec 7, 2022

Closed as stale. The development of the C++ client has been permanently moved to https://github.com/apache/pulsar-client-cpp. If this is still relevant, please open an issue there.

@tisonkun tisonkun closed this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants