logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radovan Raszka <ras...@hasam.cz>
Subject RE: log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [locationInfo] to set object on [log4net.Layout.PatternLayout]
Date Thu, 26 Oct 2017 08:55:24 GMT
Simply remove <locationInfo value="false" /> node from configuration.
Location is property of XmlLayoutBase class, but PatternLayout doesn't inherit from this class.

Radovan

-----Original Message-----
From: mkamoski [mailto:mkamoski@gmail.com] 
Sent: Monday, October 23, 2017 1:57 PM
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