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

Java-Logging-API (JUL): Configuring LoggingHandler and LoggingEnhancer does not work #1224

Open
mwolff-bay opened this issue Dec 6, 2022 · 5 comments
Assignees
Labels
api: logging Issues related to the googleapis/java-logging API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@mwolff-bay
Copy link

mwolff-bay commented Dec 6, 2022

Hi all,

I try to run/deploy a Google-AppEngine application which uses java.util.logging for creating log entries utilizing the feature of configuring the (Google-)LoggingHandler in combination with a specific LoggingEnhancer. I followed the instructions documented at Setting Up Cloud Logging for Java, but I didn't succeed.
Pls. find here HelloWord-JAVA8 a demo application based on GoogleCloudPlatform HelloWorld, which should make usage of this feature.

From my point of view the configured LoggingHandler and the attached LoggingEnhancer will be ignored, resp. doesn't work at all.

I also tried it in a JAVA11 environment (which - in the end - is the desired one), but same result.

Note: You've to adapt the projectId accordingly in the pom.

Regards,
Michael

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging API. label Dec 6, 2022
@losalex losalex added type: question Request for information or clarification. Not an issue. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 6, 2022
@daniel-sanche
Copy link
Contributor

Hey @mwolff-bay, could you give some more information on what you're seeing? Are the logs being ignored, or is there an error being thrown somewhere? Have you tried deploying locally, or only on App Engine? Does any part of the documentation you linked work?

@mwolff-bay
Copy link
Author

mwolff-bay commented Apr 20, 2023

@daniel-sanche Hi, I tried it locally, as well as on App Engine (standard env). The logs will be shown, and when I change something in the logging.properties (e.g. the log level), it will be considered. But the SampleEnhancer won't be called at all.

@losalex losalex removed their assignment Jul 3, 2023
@triplequark triplequark added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jul 20, 2023
@kolea2 kolea2 removed their assignment Oct 31, 2023
@cindy-peng
Copy link
Contributor

Hi @mwolff-bay, are you still running into this issue? If so, could you provide us a code example of the latest repro? Thanks!

@mwolff-bay
Copy link
Author

Hi Cindy, I didn't try it again. Meanwhile I've implemented another solution by directly using the logging api.

@cindy-peng
Copy link
Contributor

Thank you! We will take a look at it and see if we can repro from our side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

6 participants