开发者

Log4net doesn't log during Release mode

开发者 https://www.devze.com 2023-01-04 18:58 出处:网络
In debug mode Log4net is logging properly. In Release mode also it Logs properly. But the problem is that, in release mode if I log from one of specific class(only one), it doesn\'t log(that class log

In debug mode Log4net is logging properly. In Release mode also it Logs properly. But the problem is that, in release mode if I log from one of specific class(only one), it doesn't log(that class logs in debug mode). Other classes are logging properly even in release mode using the same logger.

Here is the Config

        <root>
            <level value="INFO" />
        </root>
        <logger name="Japt">
            <level value="DEBUG" />
            <appender-ref ref="JaptAuditLogDbAppender" />
        </logger>

I am using the same config file for both debug and release mode.

Any hel开发者_如何学Pythonp will be appreciated.


If the class in question is small and simple, it could be converted into inline code by the optimizer.

If this is the case, then I think you can add an attribute to display the inlining, eg

[MethodImpl(MethodImplOptions.NoInlining)]
void Japt()
0

精彩评论

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