Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 203D918141 for ; Sun, 30 Aug 2015 19:13:46 +0000 (UTC) Received: (qmail 67205 invoked by uid 500); 30 Aug 2015 18:13:46 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 67148 invoked by uid 500); 30 Aug 2015 18:13:46 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 67138 invoked by uid 99); 30 Aug 2015 18:13:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Aug 2015 18:13:46 +0000 Date: Sun, 30 Aug 2015 18:13:46 +0000 (UTC) From: "Bart S. (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (LOG4J2-952) FAQ: How do I configure log4j2 programmatically in code without a configuration file? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-952?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Bart S. updated LOG4J2-952: --------------------------- Comment: was deleted (was: You have an issue with actually thinking about something. Or really t= hinking it through. I guess that is pretty common in open source and it is = the reason why most open source is so bad. You want me to adjust to your style of thinking, terse and to the point and= quick and start coding right away and if there are no more complaints, com= mit it and go on with it. If I hadn't written down these thoughts, I could not have thought them, and= if I did not think them, I would not be now at the point that I want to wr= ite an example or alternative test solution or case myself. You seem to thi= nk that life proceeds when you constantly try to hinder it, but that doesn'= t work for me. I experience constantly, much less here, that my contributio= ns are not welcome because they are too verbose for the people that want to= get on with doing what they have been doing for centuries, often without a= ny reflection on their part or understanding of what they're really doing. There is a great hate in open source against actual thinking. People do not= like to think. They only like to act. To perform. To put in effort with th= eir hands. But the effort with their minds is discontinued, cut short. Most= open source architecture is of really poor design. Most teams spend very l= ittle time thinking. They want short directions. Tell me what to do?. Pleas= e, don't make me have to think about it. Just tell me what to do, and I wil= l do it!. Gary is one of those people that likes to be told what to do, but= at the same time he enjoys thought as well. I really like Gary around here= and he's funny, has a good humour, is always positive and sees the bright = side of things. But you are constantly telling me that you don't have time. Or you just don't want another influence on the team, but that might also j= ust be the reason..... Now you're even threatening me with exercising your = superior powers. To get it the way you want. We call that "power corrupts".= You abuse your position to cut short a contribution that might threaten yo= ur position. You did it to that Behrooz guy as well. There's really little = wonder that we haven't heard from him again. You create your own solution w= ith your superior knowledge (accept it, you are much better versed in your = software than everyone else) and you can create a solution to this problem = that is acceptable to many at the surface and you can ensure that it gets t= hrough and the others don't, more or less. What's the point for him to cont= inue his work if you do not engage in debate but simply push your own solut= ion as a competitor?. You tell him his solution might be preferable but you= 're now already talking of committing the thing you have written. I take it= to mean you are committing to master, or whatever. There was not a chance = for that poor guy to get his work done. I don't mind it so much, I can stil= l work with you, but you didn't throw my work to the bathwater, so to speak= . Of course he is suspect and not very eager to continue the work if the chan= ce is very high that you will simply commit yours and there won't be a real= interest from your side of the story for anything else. You have just pres= ented your solution and that's that. But you're also the one with commit rights and the one who can get it done = in no time. So little chance for anyone else, while it was really other peo= ple's ideas that started this and you've just taken it from there. I don't really know why you're doing it like this, but I guess that is not = my problem or my thing to know about. I just know that you're not helping here and your comments about short thin= king are not sincere. It's more about your position (or anyone else's) than= anything else. It's pretty blatantly obvious that what I've written cannot= be summarized in 10 lines unless I throw almost everything out, and the ch= ances of then any of it making it through to anything worthwhile, diminish = greatly, and that is of course what you want from me. ?. You will also not know the rationale, and why such a thing should be done. = You've consumed my rationale in the past and done your thing with it, while= at the same time trying to discount it all the same. It is pretty clear th= at without my input and those of others perhaps, this topic would not have = started and you would not even have gotten the idea to implement this thing= . I've been a huge contribution or at least a driver to the interest in getti= ng this done in the first place and so has Behrooz of course, in that sligh= t way of introducing a competitor or alternative. And even though that's tr= ue, you seek to curtail my efforts to get something better done than this. = You want to talk about the details; the larger plan is already set for you.= You don't even know if anyone is waiting for this. It doesn't really coinc= ide with the interests of those who started this. You think your solution s= hould qualify for them, but..... But your solution does (I believe) change ConfigurationFactory and that mea= ns it gets deeply embedded in the system, there is also not any room for an= alternative that I vied for. You just don't think and just do what you wan= t. Maybe that's your right, but it's also my right to want to change your m= ind about it ;-). But it's pretty damn clear that you're only saying these things because you= don't want any form of competition. It's not that it's too long, it's more= that it doesn't suit you. If you can curtail my messages to be 10 lines lo= ng, I'd be no more any threat. I'd just be a bystander with no influence an= d you can just go along your way. Happy cruisin. My contribution is just not welcome, well, then say so, instead of being so= insincere about it. You don't have a problem with the length, you have a p= roblem with the content. And the content is not welcome. People usually giv= e insincere reasons for not wanting something, when they just want to be ri= d of it. They will tell you you're not polite enough. But they really don't= want to hear your truth. The truth can be inconvenient, as mr. Gore put it= . It's pretty clear that I can not say the same stuff in 10 lines, so my me= ssage becomes completely ineffective and doesn't relay the same ideas. And = that's just a way to eliminate someone. And you know that full well. And I = cannot work in this environment if my contributions are not welcomed, certa= inly not for the reasons you give me, because if I supply patches they are = also not considered and accepted. So the thought that you wanted me to do w= ork, or actually contribute code, is also not sincere. That's not it. You j= ust want me out of the way really, at least partly, modestly. How can that = not be true?. There is a Jira here [LOG42-1093|https://issues.apache.org/jira/browse/LOG4= J2-1093] that I contributed 15 days ago with a patch open for feedback. No = one even gave feedback except for Gary, slightly, by the side. As to why we= 're uncertain as to how to proceed. And I can understand that. But still ge= tting no replies is not sincere. So you were exposed there, so to speak. (In Dutch we say "fall through the = basket"). It's not about contributing code and it's not about being concise= , it's just about you not really welcoming my work. Well, that can be true.= Then say so, if it is. Then we can work with that or I can leave in whatev= er way you deem suitable. I don't want to supersede you or sidestep you, this is your project and I o= nly want to help if it's welcome. What use is there doing anything if it's = going to be rejected anyway?. So I mean, take your call, make your bet. Tell me what you want. But don't = give me that crap about changing my style of thinking or my style of writin= g. I will not do that for anyone and I cannot do it in any case without sev= erely sacrificing my joy and pleasure in doing it in the first place. And y= ou don't want that either, because an unhappy person won't be around for lo= ng anyway. So then what you got? Is that what you want?..... You can only m= ake people leave this way, but apparently that was your indication in the f= irst place?????. Well, then be more upright about it. We will all benefit in that way. Regards, and signing out again. Bart. ) > FAQ: How do I configure log4j2 programmatically in code without a configu= ration file? > -------------------------------------------------------------------------= ------------ > > Key: LOG4J2-952 > URL: https://issues.apache.org/jira/browse/LOG4J2-952 > Project: Log4j 2 > Issue Type: Bug > Components: API, Configurators, Documentation > Affects Versions: 2.1 > Reporter: Joe Merten > Attachments: LOG4J2-952-2.patch, LOG4J2-952-3.patch, LOG4J2-952-4= .patch, LOG4J2-952.patch > > > I found [this link|http://logging.apache.org/log4j/2.x/faq.html#config_fr= om_code] which said: > {quote} > You could use the static method #initialize(String contextName, ClassLoad= er loader, String configLocation) in org.apache.logging.log4j.core.config.C= onfigurator. (You can pass null for the class loader.) Be aware that this c= lass is not part of the public API so your code may break with any minor re= lease. > {quote} > This documentation is unclear because it points to a member function whic= h needs a filename {{configLocation}} where as the topic is =C2=BBwithout a= configuration file=C2=AB. > It shoud rather point to the member function {{org.apache.logging.log4j.c= ore.config.Configurator.initialize(ClassLoader loader, ConfigurationSource = source)}}. > Example: > {code:java} > import org.apache.logging.log4j.core.config.ConfigurationSource; > import org.apache.logging.log4j.core.config.Configurator; > final String hardCodedXmlConfig =3D > "\n" + > "\n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > " \n" + > "\n"; > try { > Configurator.initialize(null, new ConfigurationSource(new ByteArrayIn= putStream(hardCodedXmlConfig.getBytes()))); > } catch (IOException e) { > e.printStackTrace(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org