using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;

namespace MESws
{
    public class Log
    {

        public static void WriteLog(string msg, iMESLog.iMESLogLevel level, Exception e = null)
        {
            string MethodInfo = "";
            var ss = new StackTrace(true);
            var mb = ss.GetFrame(1).GetMethod();
            MethodInfo = mb.DeclaringType.Namespace + "." + mb.DeclaringType.Name + "." + mb.Name;

            var log = new iMESLog.MESLog(mb.DeclaringType.Namespace);
            log.WriteLog(msg, level, e, MethodInfo);
        }

    }
}