Disable warning log (v2.4).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
Hi All,

Is there any way to disable warning log? I got more than 1000 log records a day.

Thanks,
Eric
12 年 前
1. Open \Libraries\Nop.Services\Logging\DefaultLogger.cs file
2. Replace
public virtual bool IsEnabled(LogLevel level)
        {
            switch(level)
            {
                case LogLevel.Debug:
                    return false;
                default:
                    return true;
            }
        }

with
public virtual bool IsEnabled(LogLevel level)
        {
            switch(level)
            {
                case LogLevel.Debug:
                case LogLevel.Warning:
                    return false;
                default:
                    return true;
            }
        }

3. Recompile the solution
12 年 前
Thanks A.M
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.