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 06:53:17 UTC

[GitHub] [logging-log4cxx] swebb2066 opened a new pull request, #140: Prefer a file named like the executable for configuration data.

swebb2066 opened a new pull request, #140:
URL: https://github.com/apache/logging-log4cxx/pull/140

   I believe naming the configuration file like the executable this is a very common use case.
   
   This Pr support testing (where the configuration file is in the current directory) and the shipped product (where the configuration file is in the same directory as the executable.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
swebb2066 commented on PR #140:
URL: https://github.com/apache/logging-log4cxx/pull/140#issuecomment-1272235260

   There are to many possibilities for configuration file names and operating systems


-- 
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


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

Posted by GitBox <gi...@apache.org>.
swebb2066 commented on code in PR #140:
URL: https://github.com/apache/logging-log4cxx/pull/140#discussion_r990557201


##########
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:
   I will have to abandon this PR as I do not know how to make it work on Macos.
   
   I am thinking I will put the file name selection code in an example MyLogManager.cpp instead.



-- 
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


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

Posted by GitBox <gi...@apache.org>.
swebb2066 commented on code in PR #140:
URL: https://github.com/apache/logging-log4cxx/pull/140#discussion_r990557201


##########
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:
   I will have to abandon the alternate name logic in DefaultConfigurator.cpp as I do not know how to make it work on Macos.
   
   I am thinking I will put the file name selection code in an example MyLogManager.cpp instead.



-- 
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


[GitHub] [logging-log4cxx] swebb2066 closed pull request #140: Prefer a file named like the executable for configuration data.

Posted by GitBox <gi...@apache.org>.
swebb2066 closed pull request #140: Prefer a file named like the executable for configuration data.
URL: https://github.com/apache/logging-log4cxx/pull/140


-- 
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