Younes CHEIKH created LOG4NET-499:
-------------------------------------
Summary: Log4net configSource with Environment Variables
Key: LOG4NET-499
URL: https://issues.apache.org/jira/browse/LOG4NET-499
Project: Log4net
Issue Type: Bug
Components: Other
Affects Versions: 1.2.15
Reporter: Younes CHEIKH
Priority: Trivial
When separating Log4Net configuration in an external configuration file
situated in separated base directory, i tried to specify the path of the file
by using Environment variables :
<log4net configSource="${CONFIG_BASE}\config\log4net.config" />
where CONFIG_BASE is the key of an environment variable i got the following
errors:
log4net:ERROR Failed to parse config file. Is the <configSections> specified
as: <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net,
Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a" />
System.Configuration.ConfigurationErrorsException: Unable to open configSource
file '${PRODUCT_BASE}\config\Log4Net.config'.
(Tests\bin\Debug\MY_PRODUCT.Core.Tests.dll.config line 10)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys,
SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord,
SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord
factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean
getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject,
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject,
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject,
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String
sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at log4net.Config.XmlConfigurator.InternalConfigure(ILoggerRepository
repository)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)