You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/10/07 13:28:23 UTC

[GitHub] [logging-log4cxx] ams-tschoening commented on a diff in pull request #140: Prefer a file named like the executable for configuration data.

ams-tschoening commented on code in PR #140:
URL: https://github.com/apache/logging-log4cxx/pull/140#discussion_r990091018


##########
src/main/cpp/defaultconfigurator.cpp:
##########
@@ -60,17 +131,32 @@ void DefaultConfigurator::configure(LoggerRepositoryPtr repository)
 
 	if (configurationFileName.empty())
 	{
-		const char* names[] = { "log4cxx.xml", "log4cxx.properties", "log4j.xml", "log4j.properties", 0 };

Review Comment:
   How about not removing those names and instead use them additionally as suffix to the executed binary? I'm following this naming scheme and am somewhat sure I've read about it elsewhere as well in the past few years:
   
   ```
   some.exe
   some.exe.config.xml
   some.exe.log4cxx.xml
   some.dll
   some.dll.[...]
   ```
   
   Microsoft is using something similar:
   
   ```
   VSPerfReport.exe.manifest
   testhost.net48.arm64.exe.config
   ```
   
   Having only the extension XML or else to the binary name is too broad in my opinion, instead especially `.xml`, `.json`, `.yaml` etc. is used for app configs often.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org