logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lansdaal, Michael T" <michael.t.lansd...@boeing.com>
Subject RE: log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [locationInfo] to set object on [log4net.Layout.PatternLayout]
Date Mon, 23 Oct 2017 13:01:24 GMT
Never used "locationInfo" before (in my log4net config files), but you have it as a child of
"layout".

This reference (https://logging.apache.org/log4net/release/sdk/html/P_log4net_Layout_XmlLayoutBase_LocationInfo.htm
)
Has this remark:
If you are embedding this layout within an SMTPAppender then make sure to set the LocationInfo
option of that appender as well

So, do you have "locationInfo" in the right place?

Thanks, Mike


-----Original Message-----
From: mkamoski [mailto:mkamoski@gmail.com] 
Sent: Monday, October 23, 2017 4:57 AM
To: log4net-user@logging.apache.org
Subject: log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [locationInfo] to set
object on [log4net.Layout.PatternLayout]


Dear log4net Power Users,

Please help with this error...

log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [locationInfo] to set object
on [log4net.Layout.PatternLayout]

...my config looks like this...

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
    <appender name="RollingFile"
type="log4net.Appender.RollingFileAppender">
        <file value="Portals/_default/Logs/" />
        <datePattern value="yyyy.MM.dd'.log.resources'" />
        <rollingStyle value="Date" />
        <staticLogFileName value="false" />
        <appendToFile value="true" />
        <maximumFileSize value="10MB" />
        <maxSizeRollBackups value="5" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%property{log4net:HostName}][Thread:%thread][%level]
%logger - %message%newline" />
            <locationInfo value="false" />
        </layout>
    </appender>
    <root>
        <level value="Error" />
        <appender-ref ref="RollingFile" />
    </root>
</log4net>

...so what do I need to do to get rid of that error?

Please advise.

Thanks.

-- Mark Kamoski




--
Sent from: http://apache-logging.6191.n7.nabble.com/Log4net-Users-f19152.html



Mime
View raw message