To me this sounds rather strange because it sounds like a mix-up of unrelated applications. Let me explain my reasoning..
Typically, log4net would run on an entirely different machine than where log4php runs (i.e. apache2). At least it would not coexist within an apache2 process since apache2 would not run dotnet assemblies as far as I am aware of. So there are at least two completely unrelated processes sourcing one and the same configuration file. It's like apache2 reading the postfix configuration, isn't it? 2017-08-07 17:09 GMT+02:00 Matt Sicker <[email protected]>: > I'm guessing that there are two separate applications running that want to > use the same configuration. Such an idea wouldn't allow for logging to the > same file all that well (synchronization issues), but being able to use the > same config file across different languages would be nice. > > On 7 August 2017 at 07:59, Dominik Psenner <[email protected]> wrote: > > > You have an application that both runs log4net AND log4php in the same > > process? > > > > On 7 Aug 2017 12:51 p.m., "Domínguez Moraleja, Jose Luis" < > > [email protected]> wrote: > > > > > I'm working in a project and we want to use this two libraries log4php > > and > > > log4net. > > > > > > We want to use just one configuration file, is there any way to do it > > like > > > this?: > > > > > > <?xml version="1.0" encoding="utf-8" ?> > > > <configuration> > > > > > > <configSections> > > > <section name="log4net" type="log4net.Config. > > > Log4NetConfigurationSectionHandler,log4net" /> > > > <section name="log4php" type="?????" /> > > > </configSections> > > > > > > <log4net> > > > <appender name="FOOCon" type="log4net.Appender.ConsoleAppender"> > > > > > > <layout type="log4net.Layout.PatternLayout"> > > > <!-- Print the date in ISO 8601 format --> > > > <conversionPattern value="%date [%thread] %-5level %logger > %ndc - > > > %message%newline" /> > > > </layout> > > > </appender> > > > > > > <appender name="SIDERA-OP-File" type="log4net.Appender. > > > RollingFileAppender"> > > > <file value="ServiceOPC.log" /> > > > <appendToFile value="true" /> > > > <rollingStyle value="Size"/> > > > <maxSizeRollBackups value="20"/> > > > <maximumFileSize value="1000KB"/> > > > <layout type="log4net.Layout.PatternLayout"> > > > <conversionPattern value="%date [%thread] %-5level %logger > %ndc - > > > %message%newline" /> > > > </layout> > > > </appender> > > > > > > <root> > > > <level value="DEBUG" /> > > > <appender-ref ref="SIDERA-OP" /> > > > <appender-ref ref="SIDERA-OP-File" /> > > > </root> > > > > > > </log4net> > > > > > > <log4php> > > > <appender name="SIDERA-OP" class="LoggerAppenderConsole"> > > > <layout class="LoggerLayoutPattern"> > > > <!-- Print the date in ISO 8601 format --> > > > <param name="conversionPattern" value="%date [%pid] %-5level > > %logger > > > %ndc - %msg%n" /> > > > </layout> > > > </appender> > > > > > > <appender name="SIDERA-OP-File" class="LoggerAppenderRollingFile"> > > > <param name="file" value="ServiceOPC.log" /> > > > <param name="append" value="true" /> > > > <param name="maxBackupIndex" value="20" /> > > > <param name="maxFileSize" value="1000KB" /> > > > <layout class="LoggerLayoutPattern"> > > > <param name="conversionPattern" value="%date [%pid] %-5level > > %logger > > > %ndc - %msg%n" /> > > > </layout> > > > </appender> > > > > > > <root> > > > <level value="DEBUG" /> > > > <appender_ref ref="SIDERA-OP" /> > > > <appender_ref ref="SIDERA-OP-File" /> > > > </root> > > > </log4php> > > > > > > </configuration> > > > > > > Saludos, > > > Jose > > > > > > > > > > > > ________________________________ > > > Este mensaje va dirigido, de manera exclusiva, a su destinatario y > > > contiene información confidencial y sujeta a secreto profesional, cuya > > > divulgación no está permitida por la ley. En caso de haber recibido > este > > > mensaje por error, le rogamos que, de forma inmediata, nos lo comunique > > > mediante correo electrónico remitido a nuestra atención o a través del > > > teléfono (+34) 91 623 22 00 y proceda a su eliminación, así como a la > de > > > cualquier documento adjunto al mismo. Así mismo, le comunicamos que la > > > distribución, copia o utilización de este mensaje, o de cualquier > > documento > > > adjunto al mismo, cualquiera que fuera su finalidad, están prohibidas > por > > > ley. El correo electrónico vía Internet no permite asegurar la > > > confidencialidad de los mensajes que se transmiten ni su integridad o > > > correcta recepción. GRUPO SICE TECNOLOGIA Y SISTEMAS no asume > > > responsabilidad por estas circunstancias. Si el destinatario de este > > > mensaje no consintiera la utilización del correo electrónico vía > > Internet y > > > la grabación de los mensajes, rogamos lo ponga en nuestro conocimiento > de > > > forma inmediata. En cumplimiento de la normativa de protección de > datos, > > le > > > informamos de que sus datos personales forman parte de un fichero > > propiedad > > > de GRUPO SICE TECNOLOGIA Y SISTEMAS y son tratados con la finalidad de > > > mantenimiento de la relación adquirida con usted. Puede ejercitar los > > > derechos de acceso, rectificación, cancelación y oposición dirigiéndose > > por > > > escrito a la dirección arriba indicada. > > > > > > This message is intended exclusively for its addressee and contains > > > confidential information and subject to professional secrecy, the > > > disclosure of which is not permitted by law. If you have received this > > > message in error, please immediately notify us by e-mail sent to our > > > attention or via telephone (+34) 91 623 22 00 and proceed to its > > > elimination, as well as any document attached to it. Likewise, we > inform > > > you that the distribution, copying or use of this message, or any > > document > > > attached to the same, whatever its purpose, are prohibited by law. The > > > Internet e-mail does not ensure the confidentiality of messages that > are > > > transmitted or its integrity or proper reception. GRUPO SICE > TECNOLOGIA Y > > > SISTEMAS assumes no responsibility for these circumstances. If the > > > recipient of this message does not consent to the use of e-mail via the > > > Internet and the recording of the messages, please put it in our > > knowledge > > > immediately. In compliance with the regulations of data protection, we > > > inform you that your personal data are part of a file property of GRUPO > > > SICE TECNOLOGIA Y SISTEMAS and are treated with the aim of maintaining > > the > > > relationship gained with you. You can exercise your rights of access, > > > rectification, cancellation and opposition by writing to the address > > > indicated above. > > > ____________________________________________________________ > > > ____________________________________________________________ > > > ____________________________________________________________ > > > _________________________ > > > > > > > > > -- > Matt Sicker <[email protected]> > -- Dominik Psenner
