RE: [log4net][log4php] Xml Config file

2017-08-08 Thread Domínguez Moraleja , Jose Luis
I agree with you in a lot of things, but I think, maybe for my lack of 
experience talking in English, that you don't understand me at all.
1.- I would like just to give the possibility to share the same file, it is not 
mandatory but would be the default solution.
2.- What I want to share is just the "storage", in this case an XmlFile

In order to do this I think that as any storage system does we need an index, 
this index is  tag.
There you indicate the node of each logging subsystem in this case  
and there should be another for . How do you indicate this? Is not 
what I'm proposing as I don't know it deeply, maybe a fullpath to the node, 
maybe just one tag  don't know what is the best way.

Inside each tag, each one could still be using whatever attributes they use, I 
think what they are using now would be fine.

There's no reason to share appenders or other things, I'm not talking about 
this, just what I hope I explain now better.

Saludos,
Jose


-Mensaje original-
De: Dominik Psenner [mailto:dpsen...@gmail.com]
Enviado el: martes, 8 de agosto de 2017 14:45
Para: dev@logging.apache.org
Asunto: RE: [log4net][log4php] Xml Config file

There is at the moment only the idea of a common logging configuration 
specification for all the logging services subprojects. Note that this topic 
sounds like a great idea at first but gets complicated really quickly when 
thinking about all the different appenders, different notions about classes and 
namespaces or even differences in the environments like how settings are saved 
and retrieved. Storing the configuration in xml is not on all platforms the 
first choice. Because of these differences the different logging subprojects 
have evolved and they only share one thing:
they are there to provide a logging framework that fits into the environments 
where they run.

You could base your configuration files on a common configuration file and 
generate one for log4net and one for log4php during the release or deployment 
process. However i doubt the effort outweighs the benefits because every 
installation needs something slightly different. Further, when investigating an 
issue in backend A it should not affect backend B or frontend C and no longer 
be replaced by the default configuration on an update.

Last but not least, I would like to mention that decoupling applications is a 
great thing. A strongly coupled application is hard to maintain and refactor. 
And yes, I've been in such a situation and got no t-shirt. This is what I've 
learned back then:

https://en.m.wikipedia.org/wiki/Separation_of_concerns

As you say, you have two systems running on the same machine and they are two 
systems that are related, but developers and devops should care where they 
relate. Where they "communicate", there should be an API and the surface of 
both should be as small as possible. Hidden dependencies is not a great thing 
because it makes space for culprits and pitfalls.

On 8 Aug 2017 8:16 a.m., "Domínguez Moraleja, Jose Luis" < 
jldomingue...@sice.com> wrote:

> That is not correct because your base "is what typically happens" is
> not really/fully true.
> We have the two system running in the same machine (not matter if they
> are separate, just take care) and also they are related.
> The difference between them is the business that they cover.
> One of them is used for configuration and the other is for the
> business itself.
>
> The more we spread configuration the more difficult to maintain. (This
> two systems are the base unit of lot of systems.)
>
> And that's why we want to use just one file, and XML support this very
> well, and also in log4net you can see that they thought about it and
> you can embed your configuration following the example I gave, but php
> does not allow it as it doesn't manage  tag. Well I
> think this is the problem, but not quite sure. That's why I ask how
> can I do this, I have a solution but I don't think it is the right way to do 
> things.
>
>
>
> Saludos,
> Jose
>
> -Mensaje original-
> De: Dominik Psenner [mailto:dpsen...@gmail.com] Enviado el: lunes, 7
> de agosto de 2017 21:16
> Para: dev@logging.apache.org
> Asunto: Re: [log4net][log4php] Xml Config file
>
> 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 :
>
> > 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 

[jira] [Updated] (LOG4NET-558) log4net 2.0.7 and greater doesn't log %message pattern

2017-08-08 Thread Georgi Zhelezarov (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4NET-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georgi Zhelezarov updated LOG4NET-558:
--
Attachment: ConsoleApp1.zip

Test application that prints a few lines with and without NDC.

Working correctly on Win 8.1
+*NOT*+ working on Win 7 , Win xp

> log4net 2.0.7 and greater doesn't log %message pattern
> --
>
> Key: LOG4NET-558
> URL: https://issues.apache.org/jira/browse/LOG4NET-558
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7, 2.0.8
> Environment: Windows XP SP3 Home Edition
>Reporter: Varlamov Oleg
>Priority: Critical
> Fix For: 1.2.15
>
> Attachments: ConsoleApp1.zip
>
>
> When we are updated log4net from 1.2.15 to 2.0.7 some of our customers report 
> about wrong logging in RollingFileAppender. 
> Log file looks like:
> 2017-03-07 05:45:23,250 [1] WARN  Driver [2017-03-07 05:45:32,718 [1] INFO  
> Driver [2017-03-07 05:45:36,515 [1] INFO  Driver [2017-03-07 05:45:37,843 [1] 
> INFO  Driver [2017-03-07 05:45:37,875 [1] INFO  Driver [2017-03-07 
> 05:45:38,125 [1] INFO  WebcashClient [2017-03-07 05:45:40,828 [7] INFO  
> Driver [2017-03-07 05:45:40,937 [7] INFO  Driver [2017-03-07 05:45:41,093 [7] 
> INFO  Driver [2017-03-07 05:45:41,296 [7] INFO  Driver [2017-03-07 
> 05:45:41,328 [7] INFO  Driver [2017-03-07 05:45:41,328 [7] INFO  Driver 
> [2017-03-07 05:45:41,343 [7] INFO  Driver [2017-03-07 05:45:41,343 [7] INFO  
> Driver [2017-03-07 05:45:41,375 [7] INFO  Driver [2017-03-07 05:45:41,375 [7] 
> INFO  Driver [2017-03-07 05:45:41,531 [7] INFO  Driver [2017-03-07 
> 05:45:41,531 [7] INFO  Driver [2017-03-07 05:45:41,562 [6] INFO  Driver 
> [2017-03-07 05:45:41,562 [6] INFO  Driver [2017-03-07 05:45:41,578 [6] INFO  
> Driver [2017-03-07 05:45:41,578 [6] INFO  Driver [2017-03-07 05:45:41,593 [6] 
> INFO  Driver [2017-03-07 05:45:41,593 [6] INFO  Driver [2017-03-07 
> 05:45:41,609 [6] INFO  Driver [2017-03-07 05:45:41,609 [6] INFO  Driver 
> [2017-03-07 05:45:41,625 [6] INFO  Driver [2017-03-07 05:45:41,625 [6] INFO  
> Driver [2017-03-07 05:45:41,640 [1] INFO  WebcashClient [2017-03-07 
> 05:45:41,781 [6] INFO  Driver [2017-03-07 05:45:41,781 [6] INFO  Driver 
> [2017-03-07 05:45:41,859 [6] ...
> As I understood it can't handle "[%property{NDC}] - %message%newline" pattern.
> Appender configuration:
>  
>   
>   
>   
>   
>   
>   
> 
>   
>   
> 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (LOG4NET-558) log4net 2.0.7 and greater doesn't log %message pattern

2017-08-08 Thread Georgi Zhelezarov (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118230#comment-16118230
 ] 

Georgi Zhelezarov commented on LOG4NET-558:
---

Hello , 

i managed to reproduce the issue. I created a sample console App. Interestingly 
the issue  with the ndc is only on Windows 7 and XP. 
The conversion pattern is as follows:
{code:xml}
  
{code}

To sum up the example application works on Windows 8.1 but not on Windows 7 and 
WIndows XP. 

> log4net 2.0.7 and greater doesn't log %message pattern
> --
>
> Key: LOG4NET-558
> URL: https://issues.apache.org/jira/browse/LOG4NET-558
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7, 2.0.8
> Environment: Windows XP SP3 Home Edition
>Reporter: Varlamov Oleg
>Priority: Critical
> Fix For: 1.2.15
>
>
> When we are updated log4net from 1.2.15 to 2.0.7 some of our customers report 
> about wrong logging in RollingFileAppender. 
> Log file looks like:
> 2017-03-07 05:45:23,250 [1] WARN  Driver [2017-03-07 05:45:32,718 [1] INFO  
> Driver [2017-03-07 05:45:36,515 [1] INFO  Driver [2017-03-07 05:45:37,843 [1] 
> INFO  Driver [2017-03-07 05:45:37,875 [1] INFO  Driver [2017-03-07 
> 05:45:38,125 [1] INFO  WebcashClient [2017-03-07 05:45:40,828 [7] INFO  
> Driver [2017-03-07 05:45:40,937 [7] INFO  Driver [2017-03-07 05:45:41,093 [7] 
> INFO  Driver [2017-03-07 05:45:41,296 [7] INFO  Driver [2017-03-07 
> 05:45:41,328 [7] INFO  Driver [2017-03-07 05:45:41,328 [7] INFO  Driver 
> [2017-03-07 05:45:41,343 [7] INFO  Driver [2017-03-07 05:45:41,343 [7] INFO  
> Driver [2017-03-07 05:45:41,375 [7] INFO  Driver [2017-03-07 05:45:41,375 [7] 
> INFO  Driver [2017-03-07 05:45:41,531 [7] INFO  Driver [2017-03-07 
> 05:45:41,531 [7] INFO  Driver [2017-03-07 05:45:41,562 [6] INFO  Driver 
> [2017-03-07 05:45:41,562 [6] INFO  Driver [2017-03-07 05:45:41,578 [6] INFO  
> Driver [2017-03-07 05:45:41,578 [6] INFO  Driver [2017-03-07 05:45:41,593 [6] 
> INFO  Driver [2017-03-07 05:45:41,593 [6] INFO  Driver [2017-03-07 
> 05:45:41,609 [6] INFO  Driver [2017-03-07 05:45:41,609 [6] INFO  Driver 
> [2017-03-07 05:45:41,625 [6] INFO  Driver [2017-03-07 05:45:41,625 [6] INFO  
> Driver [2017-03-07 05:45:41,640 [1] INFO  WebcashClient [2017-03-07 
> 05:45:41,781 [6] INFO  Driver [2017-03-07 05:45:41,781 [6] INFO  Driver 
> [2017-03-07 05:45:41,859 [6] ...
> As I understood it can't handle "[%property{NDC}] - %message%newline" pattern.
> Appender configuration:
>  
>   
>   
>   
>   
>   
>   
> 
>   
>   
> 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: picocli in log4j

2017-08-08 Thread Remko Popma
Great, thanks for the positive feedback!

For whoever is interested, picocli autocomplete
 is now in public
beta. Spread the word! :-) Feedback welcome!

On Tue, Aug 8, 2017 at 3:06 AM, Matt Sicker  wrote:

> JCommander is in use mainly for the log4j-server stuff.
>
> On 7 August 2017 at 10:21, Chandra 
> wrote:
>
> > +1 for picocli, I looked into it some time ago and looked pretty good.
> > In-fact, I wanted to use it for my own project for `JvmTop`.
> >
> > btw, where are we using `Jcommander` in log4j2?
> >
> >
> > thanks,
> > Chandra
> >
> > On 7 Aug 2017, 8:32 PM +0530, Matt Sicker , wrote:
> > > I have no objections. I do like your library, though I haven't used it
> > for
> > > any of my own projects yet (since most of what I've been working on for
> > the
> > > past several months have all been Mesos-managed containers, so startup
> > has
> > > been mostly delegated to environment variables for configuration).
> > >
> > > The autocomplete feature sounds pretty sweet.
> > >
> > > On 4 August 2017 at 13:59, Remko Popma  wrote:
> > >
> > > > Thanks all for your positive feedback on picocli <
> http://picocli.info/
> > > > back
> > > > in April.
> > > > There have been multiple releases since then and I am confident about
> > its
> > > > stability now.
> > > >
> > > > Any objections if I replace our current usage of JCommander
> > > >  with picocli?
> > > >
> > > > Main benefits:
> > > >
> > > > - Customizable usage help
> > > > - Usage help with ANSI colors
> > > >  > > > - Better support for positional parameters
> > > > - POSIX short options (like -xvrf)
> > > > - Can be included as source to reduce external dependencies
> > > > - Coming soon: autocomplete
> > > >  > autocomplete-(work-in-
> > > > progress)
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker  >
>
>
>
> --
> Matt Sicker 
>