Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-09-20 Thread via GitHub
yybmion commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3265754355 @vy @ppkarwasz Thanks for the detailed guidance. I Created a new PR based on this discussion: #3921 Implemented the suggested approach - New method: `getConfiguratio

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-09-06 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3262159881 @ppkarwasz, can you explain why would we want to return null instead of throwing? Note that _"because we sometimes return null"_ does not constitute as an argument, since what we're tal

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-28 Thread via GitHub
ppkarwasz commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3233181160 > @ppkarwasz, since there is no established default that one can claim as a stable API, I'm inclined to throw `IAE`, or `NPE` (when arg is null) on failures. WDYT? I think

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-26 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3225044795 > One open question is how to define the nullability/return contract. The existing single-URI overload, > > ```java > public Configuration getConfiguration(LoggerContext contex

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-26 Thread via GitHub
yybmion commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3223735901 @ppkarwasz @vy Thank you both for the incredibly thoughtful discussion and analysis! I really appreciate how this conversation evolved from my initial approach to a much de

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-25 Thread via GitHub
ppkarwasz commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3219871039 My idea for the proposed method ```java public Configuration getConfiguration(LoggerContext context, String name, List uris) ``` is to encapsulate the logic cu

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-25 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3219502641 > * **`isActive()`**: aside from its inconsistent semantics today (which we could technically fix) Created #3896 for this. > **TL;DR:** Spring Boot does not actually need t

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-21 Thread via GitHub
ppkarwasz commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3211804379 > > * Implementations are **inconsistent** today: some factories always report active but conditionally restrict types (e.g., Log4j 1 XML returns `xml` only when a property is se

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3209253360 Another concern I have regarding adding a new, as a matter of fact, 2nd after `getSupportedTypes()`, _"supported file extensions"_ concept to `CF` is that it reinforces the idea of a `C

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3209220815 > > 1. It duplicates quite some logic (e.g., in `JsonConfigurationFactory`, extensions and suffixes are semantically identical). > > Totally agree. Let’s put a **default** impleme

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
yybmion commented on code in PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#discussion_r2289835030 ## log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java: ## @@ -617,4 +636,19 @@ private String[] parseConfigLocations(final S

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
ppkarwasz commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3206986816 > 1. It duplicates quite some logic (e.g., in `JsonConfigurationFactory`, extensions and suffixes are semantically identical). Totally agree. Let’s put a **default** implem

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
ppkarwasz commented on code in PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#discussion_r2288444366 ## log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java: ## @@ -263,6 +264,14 @@ public static void removeConfigurationFacto

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
vy commented on code in PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#discussion_r2288091615 ## log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java: ## @@ -617,4 +636,19 @@ private String[] parseConfigLocations(final String

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-20 Thread via GitHub
vy commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3206278760 @ppkarwasz, would you mind reminding me why we decided to introduce a new API such that 1. It duplicates quite some logic (e.g., in `JsonConfigurationFactory`, extensions and suf

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-08-19 Thread via GitHub
yybmion commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3201841069 Hi @ppkarwasz , Just a gentle reminder — PTAL when you have time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub a

Re: [PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-07-21 Thread via GitHub
github-actions[bot] commented on PR #3839: URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3099366989 Job Requested goals Build Tool Version Build Outcome Build Scan® build-

[PR] Add API to list supported configuration file extensions [logging-log4j2]

2025-07-21 Thread via GitHub
yybmion opened a new pull request, #3839: URL: https://github.com/apache/logging-log4j2/pull/3839 ### Summary Add ConfigurationFactory.getActiveFileExtensions() and getSupportedExtensions() methods to allow external frameworks like Spring Boot to determine which configuration file fo