コード例 #1
0
        /// <summary>
        /// Function to create Instance for SmartGenericLog or SmartCustomLog
        /// </summary>
        /// <returns></returns>
        public static IsmartLogger GetLogTypeInstance()
        {
            SmartLog objSmart = new SmartLog();
            bool     flag;

            bool result = bool.TryParse(objSmart.GetSettingsFromConfigFile(), out flag);

            if (result)
            {
                if (flag)
                {
                    Log = SmartCustomLog.GetSmartCustomLogger(true);
                    return(Log);
                }
            }
            Log = SmartGenericLog.GetSmartGenericLogger(true);
            return(Log);
        }
コード例 #2
0
        static SmartLog()
        {
            SmartLog objSmart = new SmartLog();
            bool     flag;

            bool result = Boolean.TryParse(objSmart.GetSettingsFromConfigFile(), out flag);

            if (result)
            {
                if (flag)
                {
                    Log = SmartCustomLog.GetSmartCustomLogger(true);
                }
                else
                {
                    Log = SmartGenericLog.GetSmartGenericLogger(true);
                }
            }
        }