How configuration is loaded can cause issues.
Updated Issue Description
Based on discussions with @jdbrown, @ehunter, and @zcloutet, we've decided the following:
-
Remove JAR_CONFIGFILE from generated Jar file -
Remove section of code from Bootstrap.loadConfig that attempts to load defaults from JAR_CONFIGFILE -
Throw an exception (halt startup) if configuration file (user-specified or default location) does not exist.
Original Issue Description
Defaults are loaded before any custom configuration file, which led to unexpected behavior. This is how configuration has worked for a decade, but is not clearly documented and should maybe work differently.
one sender configuration was overridden to send to dev instead of prod (but using the prod name). the default senders list and default sender configuration for the other sender was inherited unexpectedly.
-
should defaults be loaded when a custom config is provided? -
should senders/listeners/receivers lists be inheritable from defaults? -
if a custom configuration is specified, but the specified configuration file does not exist then throw an exception.
Edited by Martinez, Eric M.