示例#1
0
文件: Logger.cs 项目: gpanayir/sffwk
        /// <summary>
        /// Constructor de Logger.
        /// </summary>
        public Logger()
        {
            appId = Fwk.Bases.ConfigurationsHelper.HostApplicationName;
            try
            {
                _LoggingSection = ConfigurationManager.GetSection("FwkLogging") as LoggingSection;
            }
            catch (System.Configuration.ConfigurationException ex)
            {

                TechnicalException te = new
                    TechnicalException("Hay problemas al intentar cargar la configuracion FwkLogging. \r\n ", ex);
                te.Assembly = "Fwk.Logging";
                te.Class = "LoginSection";
                te.ErrorId = "9002";
                te.Namespace = "Fwk.Logging";
                te.UserName = Environment.UserName;
                te.Machine = Environment.MachineName;
                throw te;
            }
        }
示例#2
0
 public frmLoggingTest()
 {
     InitializeComponent();
     txtFilePrefix.Text = string.Concat(DateTime.Now.Hour, "_", DateTime.Now.Minute, "_");
     _LoggingSection = System.Configuration.ConfigurationManager.GetSection("FwkLogging") as LoggingSection;
 }
示例#3
0
        /// <summary>
        /// Constructor de Logger.
        /// </summary>
        static StaticLogger()
        {
            _LoggingSection = ConfigurationManager.GetSection("FwkLogging") as LoggingSection;

        }