Log4net does not register in Release mode

In debug mode, Log4net is logged correctly. In release mode, it also works correctly. But the problem is that in release mode, if I register from one of the specific classes (only one), it does not register (this class is registered in debug mode). Other classes are registered correctly even in release mode using the same registrar.

Here is the configuration

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

I use the same configuration file for debug and release mode.

Any help would be appreciated.

+3
source share
1 answer

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

, , ,

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

Source: https://habr.com/ru/post/1751524/


All Articles