开发者

newline statment does not works in Log4Net under Vista Guest account

I'm using Log4Net (1.2.10.0) for logging in my application. It's working fine - till I run it on Vista SP2 under Guest user. The log file does not contains a newline characters - all log is a single line. This is not happen when I run the application as regular or admin开发者_如何学运维 user. Only in case of built-in guest account.

Any ideas?

The configuration is as following:

<appender name="clientRollingFile" type="log4net.Appender.RollingFileAppender">
    <file value="C:\users\public\client.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="5" />
    <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %-5level %logger [%type{1}] [%ndc] - %message%newline" />
    </layout>
</appender>

Thank


Try the following layout, which includes a newline in code and not in configuration. See if the problem still occurs.

<layout type="log4net.Layout.SimpleLayout">

This won't "fix" anything, but it may help us narrow down the issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜