public void Initialize(bool beforeInit)
        {
            //Create the default/built-in objects
            _logFormatters = new ChoDictionary <string, IChoLogFormatter>(DefaultLogFormatters);

            ChoObjConfigurable.Load <IChoLogFormatter>(typeof(ChoLogFormatterSettings).Name, ChoType.GetTypes(typeof(ChoLogFormatterAttribute)),
                                                       _logFormatters, LogFormatterTypes);
        }
 public void Initialize(bool beforeInit)
 {
     _logManagers = new ChoDictionary <string, IChoLogManager>(DefaultLogManagers);
     if (!beforeInit)
     {
         ChoObjConfigurable.Load <IChoLogManager>(typeof(ChoLogManagerSettings).Name, ChoType.GetTypes(typeof(ChoLogManagerAttribute)),
                                                  _logManagers, LogManagerTypes);
     }
 }
Beispiel #3
0
        public bool Initialize(bool beforeFieldInit, object state)
        {
            //Create the default/built-in objects
            _logFormatters = new ChoDictionary <string, IChoLogFormatter>(DefaultLogFormatters);

            ChoObjConfigurable.Load <IChoLogFormatter>(ChoType.GetLogFileName(typeof(ChoLogFormatterSettings)), ChoType.GetTypes(typeof(ChoLogFormatterAttribute)),
                                                       _logFormatters, LogFormatterTypes);

            return(false);
        }
        public bool Initialize(bool beforeFieldInit, object state)
        {
            _logManagers = new ChoDictionary <string, IChoLogManager>(DefaultLogManagers);
            if (!beforeFieldInit)
            {
                ChoObjConfigurable.Load <IChoLogManager>(ChoType.GetLogFileName(typeof(ChoLogManagerSettings)), ChoType.GetTypes(typeof(ChoLogManagerAttribute)),
                                                         _logManagers, LogManagerTypes);
            }

            return(false);
        }
Beispiel #5
0
        public bool Initialize(bool beforeFieldInit, object state)
        {
            if (!beforeFieldInit)
            {
                ChoObjConfigurable.Load <IFormatProvider>(ChoPath.AddExtension(typeof(ChoFormatProviderSettings).FullName, ChoReservedFileExt.Log), ChoType.GetTypes <IFormatProvider>(),
                                                          _formatProviders, FormatProviderTypes, ChoDefaultObjectKey.Name);
            }
            //else
            //ChoStreamProfile.Clean(ChoReservedDirectoryName.Settings, ChoPath.AddExtension(typeof(ChoFormatProviderSettings).FullName, ChoReservedFileExt.Err));

            return(false);
        }