add GetSystemPropOrEnvVar function

Description

As Lucee uses system properties / env vars quite a lot, we should expose SystemUtil.getSystemPropOrEnvVar() as a BIF https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/lucee/commons/io/SystemUtil.java#L1345

GetSystemPropOrEnvVar(); returns the know list of supported properties / env vars content from

https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/resource/setting/sysprop-envvar.json

image-20250205-102956.png

GetSystemPropOrEnvVar( prop="lucee.logging.force.appender ); returns the configured value or empty string

Attachments

1
  • 05 Feb 2025, 10:29 am

Activity

Show:

Pothys - MitrahSoft 13 February 2025 at 07:55

I have tested this ticket with Lucee version 6.2.1.25-SNAPSHOT. When I ran the function GetSystemPropOrEnvVar(), it now returns all the system properties as an array. Additionally, GetSystemPropOrEnvVar(prop) returns the configured environment value when a property is specified. It works fine as expected.

Zac Spitzer 5 February 2025 at 10:29

https://github.com/lucee/Lucee/pull/2500

it is a bit flakely on startup while lucee is re-deploying and will throw an exception

Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Priority

Created 5 February 2025 at 10:26
Updated 13 February 2025 at 07:55
Resolved 13 February 2025 at 07:55

Flag notifications