/// <summary>
 /// Initializes a new instance of the <see cref="EntLibLoggerFactoryAdapter"/> class.
 /// </summary>
 /// <remarks>passed in values are not used, configuration is external to EntLib logging API</remarks>
 /// <param name="properties">The properties.</param>
 public EntLibLoggerFactoryAdapter(NameValueCollection properties)
     : this(ArgUtils.TryParse(EntLibLoggerSettings.DEFAULTPRIORITY, ArgUtils.GetValue(properties, "priority"))
            , ArgUtils.Coalesce(ArgUtils.GetValue(properties, "exceptionFormat"), EntLibLoggerSettings.DEFAULTEXCEPTIONFORMAT)
            , null
            )
 {
 }
Пример #2
0
 public UnityDebugLoggerFactoryAdapter(NameValueCollection properties)
 {
     _level            = ArgUtils.TryParseEnum(LogLevel.All, ArgUtils.GetValue(properties, "level"));
     _showLogName      = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "showLogName"));
     _showLogLevel     = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "showLogLevel"));
     _useUnityLogLevel = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "useUnityLogLevel"));
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractSimpleLoggerFactoryAdapter"/> class.
 /// </summary>
 /// <remarks>
 /// Looks for level, showDateTime, showLogName, dateTimeFormat items from
 /// <paramref name="properties" /> for use when the GetLogger methods are called.
 /// <see cref="ConfigurationSectionHandler"/> for more information on how to use the
 /// standard .NET application configuraiton file (App.config/Web.config)
 /// to configure this adapter.
 /// </remarks>
 /// <param name="properties">The name value collection, typically specified by the user in
 /// a configuration section named common/logging.</param>
 protected AbstractSimpleLoggerFactoryAdapter(NameValueCollection properties)
     : base(true)
 {
     _level          = ArgUtils.TryParseEnum(LogLevel.All, ArgUtils.GetValue(properties, "level"));
     _showDateTime   = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "showDateTime"));
     _showLogName    = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "showLogName"));
     _showLevel      = ArgUtils.TryParse(true, ArgUtils.GetValue(properties, "showLevel"));
     _dateTimeFormat = ArgUtils.GetValue(properties, "dateTimeFormat", string.Empty);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TraceLoggerFactoryAdapter"/> class.
 /// </summary>
 /// <remarks>
 /// Looks for level, showDateTime, showLogName, dateTimeFormat items from
 /// <paramref name="properties" /> for use when the GetLogger methods are called.
 /// <see cref="ConfigurationSectionHandler"/> for more information on how to use the
 /// standard .NET application configuraiton file (App.config/Web.config)
 /// to configure this adapter.
 /// </remarks>
 /// <param name="properties">The name value collection, typically specified by the user in
 /// a configuration section named common/logging.</param>
 public TraceLoggerFactoryAdapter(NameValueCollection properties)
     : base(properties)
 {
     _useTraceSource = ArgUtils.TryParse(false, properties["useTraceSource"]);
 }
 private void CheckPermitDuplicateEventSourceRegistration(NameValueCollection properties)
 {
     _permitDuplicateEventSourceRegistration = ArgUtils.TryParse(false, ArgUtils.GetValue(properties, "permitDuplicateEventSourceRegistration"));
 }
Пример #6
0
 /// <summary>
 /// Creates a new filter instance
 /// </summary>
 public SeverityFilter(NameValueCollection attributes)
     : base((attributes != null && attributes["name"] != null) ? attributes["name"] : "Severity Filter")
 {
     this.severityMask = ArgUtils.TryParse(this.severityMask
                                           , ArgUtils.GetValue(attributes, "SeverityMask"));
 }