Payara icon indicating copy to clipboard operation
Payara copied to clipboard

Bug Report: logging properties - ENV Replacement prints "Bad level value" / FISH-6506

Open Herr-Sepp opened this issue 2 years ago • 1 comments

Description


If I try to use environment variables in the logging properties, the following appears in the log:

Bad level value for property: java.util.logging.ConsoleHandler.level Can't set level for java.util.logging.ConsoleHandler

I got the format ${ENV=NAME} from here: https://docs.payara.fish/community/docs/Technical%20Documentation/Payara%20Server%20Documentation/Logging%20and%20Monitoring/Logging.html#env-var-replacement and https://github.com/payara/Payara/pull/3310

Steps to reproduce

#Linux:        
export loglevel=INFO   //or 800
#Windows: 
$env:loglevel=INFO //or 800

java -jar payara-micro-5.2022.3.jar --logProperties logging.properties

with logging.properties

#Payara Micro Logging Properties File
## Global Level
.level=FINE

## Handlers
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=${ENV=loglevel}

Environment

  • Distribution: Payara Micro 5.2022.3
  • JDK Version: 17 OpenjDK and OpenJ9
  • Operating System: Windows and Linux

Herr-Sepp avatar Aug 24 '22 11:08 Herr-Sepp

Hi @Herr-Sepp,

Thank you for this bug report, I was able to successfully reproduce this issue on the latest version of Payara Community. I have raised this to our platform development team with the internal ID FISH-6506. We always encourage you to contribute, so if you feel confident to do you please raise a PR and a member of the development team will gladly review the changes. If not, we will pick this issue up in the future.

Thanks, James

JamesHillyard avatar Aug 31 '22 09:08 JamesHillyard

Hi @Herr-Sepp,

This issue has been resolved in Payara Community Edition 5.2022.4 which has been released, please update your environment to this version to receive the fix.

Best Regards, James

JamesHillyard avatar Nov 16 '22 09:11 JamesHillyard