public LogConfigSection(XmlNode data)
        {
            var enabledStr = CouchbaseConfigSection.GetNamedAttribute(data, "enabled");

            if (enabledStr == null || !Boolean.TryParse(enabledStr, out _enabled))
            {
                _enabled = true;
            }

            var verbosityStr = CouchbaseConfigSection.GetNamedAttribute(data, "verbosity");

            if (enabledStr == null || !Enum.TryParse <Log.LogLevel> (verbosityStr, true, out _logLevel))
            {
                _logLevel = Log.LogLevel.Base;
            }

            var scrubSensitivityStr = CouchbaseConfigSection.GetNamedAttribute(data, "scrubSensitivity");

            if (scrubSensitivityStr == null || !Enum.TryParse <LogScrubSensitivity> (scrubSensitivityStr, true, out _scrubSensitivity))
            {
                _scrubSensitivity = LogScrubSensitivity.NoInsecure;
            }

            _verbositySettings = new LogDomainVerbosityCollection();
            foreach (XmlNode childNode in data.ChildNodes)
            {
                if (childNode.Name == "domains")
                {
                    _verbositySettings = new LogDomainVerbosityCollection(childNode.ChildNodes);
                }
                else
                {
                    Log.To.NoDomain.W(Tag, "Unknown element {0} found in configuration file", childNode.Name);
                }
            }
        }
        public LogConfigSection(XmlNode data)
        {
            var enabledStr = CouchbaseConfigSection.GetNamedAttribute(data, "enabled");
            if (enabledStr == null || !Boolean.TryParse (enabledStr, out _enabled)) {
                _enabled = true;
            }

            var verbosityStr = CouchbaseConfigSection.GetNamedAttribute (data, "verbosity");
            if (enabledStr == null || !Enum.TryParse<Log.LogLevel> (verbosityStr, true, out _logLevel)) {
                _logLevel = Log.LogLevel.Base;
            }

            var scrubSensitivityStr = CouchbaseConfigSection.GetNamedAttribute (data, "scrubSensitivity");
            if (scrubSensitivityStr == null || !Enum.TryParse<LogScrubSensitivity> (scrubSensitivityStr, true, out _scrubSensitivity)) {
                _scrubSensitivity = LogScrubSensitivity.NoInsecure;
            }

            _verbositySettings = new LogDomainVerbosityCollection();
            foreach (XmlNode childNode in data.ChildNodes) {
                if (childNode.Name == "domains") {
                    _verbositySettings = new LogDomainVerbosityCollection(childNode.ChildNodes);
                } else {
                    Log.To.NoDomain.W(Tag, "Unknown element {0} found in configuration file", childNode.Name);
                }
            }
        }