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

Unable to Change the Log Level of Function Pods to Debug Level to View Debug Logs for Source, Sink, and Function for Kubernetes Runtime #23783

Open
1 of 2 tasks
mukesh154 opened this issue Dec 26, 2024 · 2 comments
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@mukesh154
Copy link
Contributor

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

The pulsar-functions/runtime-all/src/main/resources/kubernetes_instance_log4j2.xml file is responsible for configuring the log settings for function pods running with the Java runtime, specifically when the functions are deployed as Kubernetes StatefulSets. Currently, this file is hardcoded to use the INFO log level, which limits our ability to adjust logging verbosity for troubleshooting or in-depth monitoring.

As it stands, there doesn't appear to be a straightforward or documented method to change the log level dynamically without modifying the kubernetes_instance_log4j2.xml file directly. This presents a challenge, especially when we need more granular logs (e.g., DEBUG level) for specific use cases such as debugging issues with sources, sinks, or function executions.

Solution

No response

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@mukesh154 mukesh154 added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Dec 26, 2024
@Joforde
Copy link

Joforde commented Dec 30, 2024

This may not be a problem, you can change the log level by environment variables, for example

broker-statefulset.yaml

env:
  - name: PULSAR_LOG_LEVEL
    value: debug

@mukesh154
Copy link
Contributor Author

mukesh154 commented Dec 30, 2024

This may not be a problem, you can change the log level by environment variables, for example

broker-statefulset.yaml

env:
  - name: PULSAR_LOG_LEVEL
    value: debug

Setting PULSAR_LOG_LEVEL env variable only enables debug log for function-broker not for functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

No branches or pull requests

2 participants