Cristian.. El archivo segun recuerdo lo tenes que tener creado. No lo crea automaticamente. saludos.
2009/4/8 Cristian C. Bittel <[email protected]> > Sebastián, viendo el link que me enviaste logré agregar esto en el > archivo de configuración, lo resalté con color rojo. También agregué una > línea de código que no la había visto antes, la agregué dentro del > Main(): log4net.Config.XmlConfigurator.Configure(); > > Con eso parece que se le indica al log4net que utilice la configuración > desde el app.config, pero de todas formas todavía no logro loguear mis > mensajes, ni siquiera se crea el archivo especificado. > > > > ¿Tenés idea qué más me puede estar faltando agregar? > > > > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <configSections> > > <sectionGroup name="applicationSettings" > type="System.Configuration.ApplicationSettingsGroup, System, > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > > > <section name="Procesamiento.Properties.Settings" > type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" > /> > > > > <section name="log4net" > type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> > > > > </sectionGroup> > > </configSections> > > <applicationSettings> > > <Procesamiento.Properties.Settings> > > <setting name="CarpetaOrigen" serializeAs="String"> > > <value>C:\Demo\Origen\</value> > > </setting> > > <setting name="CarpetaDestino" serializeAs="String"> > > <value>C:\Demo\Destino\</value> > > </setting> > > <setting name="IdentificadorEstacionTrabajo" > serializeAs="String"> > > <value>ID_WSK_01</value> > > </setting> > > </Procesamiento.Properties.Settings> > > > > <log4net debug="true"> > > <appender name="RollingLogFileAppender" > type="log4net.Appender.RollingFileAppender"> > > <file value="C:\\Temp\\TestLog.txt" /> > > <appendToFile value="true" /> > > <rollingStyle value="Size" /> > > <maxSizeRollBackups value="10" /> > > <maximumFileSize value="10MB" /> > > <staticLogFileName value="true" /> > > <layout type="log4net.Layout.PatternLayout"> > > <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M > - %m%n" /> > > </layout> > > </appender> > > > > <root> > > <level value="DEBUG" /> > > <priority value="ALL" /> > > <appender-ref ref="RollingLogFileAppender" /> > > </root> > > </log4net> > > > > </applicationSettings> > > </configuration> > > > > Cristian. > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of > *Sebastian > Fiorentino > *Sent:* miércoles, 08 de abril de 2009 02:41 p.m. > *To:* [email protected] > *Subject:* [puntonet] Log4Net > > > > Creo que esto te va a servir. > > http://www.codeproject.com/KB/dotnet/ConfigureLog4Net.aspx > > > ------------------------------ > > *De:* Cristian C. Bittel <[email protected]> > *Para:* [email protected] > *Enviado:* miércoles 8 de abril de 2009, 13:41:07 > *Asunto:* [puntonet] Log4Net > > Necesito ayuda para poner a funcionar el Log4Net. > > > > Leí el tutorial pero no termino de entender dónde debo incluir la > configuración del Log4Net. Mi aplicación tiene su propio app.config y creo > que puedo incluir ahí la configuración del log, pero no sé cómo hacerlo, > ¿alguien me puede dar una mano? > > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <configSections> > > <sectionGroup name="applicationSettings" > type="System.Configuration.ApplicationSettingsGroup, System, > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > > > <section name="Procesamiento.Properties.Settings" > type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" > /> > > </sectionGroup> > > </configSections> > > <applicationSettings> > > <Procesamiento.Properties.Settings> > > <setting name="CarpetaOrigen" serializeAs="String"> > > <value>C:\Demo\Origen\</value> > > </setting> > > <setting name="CarpetaDestino" serializeAs="String"> > > <value>C:\Demo\Destino\</value> > > </setting> > > <setting name="IdentificadorEstacionTrabajo" > serializeAs="String"> > > <value>ID_WSK_01</value> > > </setting> > > </Procesamiento.Properties.Settings> > > </applicationSettings> > > </configuration> > > > > Cristian. > > > ------------------------------ > > > Yahoo! Cocina > Recetas prácticas y comida saludable > Visitá http://ar.mujer.yahoo.com/cocina/ > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.285 / Virus Database: 270.11.45/2045 - Release Date: 04/08/09 > 05:53:00 >
