Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Events _Logs = Fwk.Logging.Events.GetFromXml <Events>(Fwk.HelperFunctions.FileFunctions.OpenTextFile(_LoggingSection.GetProvider().FileName));

            loadingResultsTextBox.Text = _Logs.GetXml();

            Target.TargetFactory(TargetType.Xml, "");
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="providerName"></param>
        /// <param name="pEventType"></param>
        /// <param name="pSource"></param>
        /// <param name="pText"></param>
        private void WriteLog(String providerName, EventType pEventType, string pSource, string pText)
        {
            // Crea un nuevo Event.
            Event wEvent = new Event(pEventType, pSource, pText);

            wEvent.AppId = appId;
            // Obtiene la Rule asociada al EventType.
            LogProviderElement wRule = _LoggingSection.GetProvider();

            // Escribe el log según la Rule.
            Target wTarget = GetTargetByProviderElement(wRule);

            wTarget.Write(wEvent);

            // Limpieza.
            wEvent = null;
            wRule  = null;
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="providerName">Nombre del proveedor de Logueo</param>
        /// <param name="ev"></param>
        /// <param name="path"></param>
        /// <param name="fileNamePrefix"></param>
        private static void WriteLog(String providerName, Event ev, string path, string fileNamePrefix)
        {
            // Obtiene el provider
            LogProviderElement provider = _LoggingSection.GetProvider(providerName);

            // Escribe el log según la Rule.
            Target wTarget = GetTargetByProvider(provider, path, fileNamePrefix);

            wTarget.Write(ev);
        }