void SetEventLogCollector()

in DiagManager/DiagClasses/ConfigFileMgr.cs [121:180]


        void SetEventLogCollector(XmlNode node)
        {

            XmlAttribute attribEventLogCollectorEnabled = doc.CreateAttribute("enabled");
            attribEventLogCollectorEnabled.Value = m_Setting[Res.CollectEventLogs];
            XmlAttribute attribEventLogCollectorStartup = doc.CreateAttribute("startup");
            attribEventLogCollectorStartup.Value = m_Setting[Res.CollectEventLogsStartup];

            XmlAttribute attribEventLogCollectorShutdown = doc.CreateAttribute("shutdown");
            attribEventLogCollectorShutdown.Value = m_Setting[Res.CollectEventLogShutdown];

            node.Attributes.Append(attribEventLogCollectorEnabled);
            node.Attributes.Append(attribEventLogCollectorStartup);
            node.Attributes.Append(attribEventLogCollectorShutdown);

            XmlNode Eventlogs = doc.CreateNode(XmlNodeType.Element, "Eventlogs", "");
            node.AppendChild(Eventlogs);


            //create the application eventlog node with attributes
            XmlNode EventLogTypeApp = doc.CreateNode(XmlNodeType.Element, "EventlogType", "");
            Eventlogs.AppendChild(EventLogTypeApp);

            XmlAttribute attribEventLogCollectorAppName = doc.CreateAttribute("name");
            attribEventLogCollectorAppName.Value = "Application";
            EventLogTypeApp.Attributes.Append(attribEventLogCollectorAppName);

            XmlAttribute attribEventLogCollectorAppEnabled = doc.CreateAttribute("enabled");
            attribEventLogCollectorAppEnabled.Value = "true";
            EventLogTypeApp.Attributes.Append(attribEventLogCollectorAppEnabled);


            //create the system eventlog node with attributes
            XmlNode EventLogTypeSys = doc.CreateNode(XmlNodeType.Element, "EventlogType", "");
            Eventlogs.AppendChild(EventLogTypeSys);

            XmlAttribute attribEventLogCollectorSysName = doc.CreateAttribute("name");
            attribEventLogCollectorSysName.Value = "System";
            EventLogTypeSys.Attributes.Append(attribEventLogCollectorSysName);

            XmlAttribute attribEventLogCollectorSysEnabled = doc.CreateAttribute("enabled");
            attribEventLogCollectorSysEnabled.Value = "true";
            EventLogTypeSys.Attributes.Append(attribEventLogCollectorSysEnabled);


            //create the Security eventlog node with attributes
            XmlNode EventLogTypeSec = doc.CreateNode(XmlNodeType.Element, "EventlogType", "");
            Eventlogs.AppendChild(EventLogTypeSec);

            XmlAttribute attribEventLogCollectorSecName = doc.CreateAttribute("name");
            attribEventLogCollectorSecName.Value = "Security";
            EventLogTypeSec.Attributes.Append(attribEventLogCollectorSecName);

            XmlAttribute attribEventLogCollectorSecEnabled = doc.CreateAttribute("enabled");
            attribEventLogCollectorSecEnabled.Value = "false";
            EventLogTypeSec.Attributes.Append(attribEventLogCollectorSecEnabled);



        }