No, no. What I am saying overall is that it would be nice for Log4j to at least have a documented opinion on JDNI, j.u.prefs, and anything else like Commons Configuration.
Gary On Tue, Jul 26, 2016 at 12:58 PM, Ralph Goers <[email protected]> wrote: > The configuration for JDBC is typically a single string. You aren’t really > thinking of storing log4j2.xml as a single String in JNDI are you? > > Key/Value pairs is what java.util.prefs does. > > Ralph > > On Jul 26, 2016, at 11:34 AM, Gary Gregory <[email protected]> wrote: > > I've used JDNI to deal with configuring JDBC connections in app servers. > It seems to work. I've not had the same painful experience as you've had. > Granted, a JDBC DataSource object is not as fancy as our configuration. The > big advantage JDBC has WRT configuration is that you usually can configure > everything with key/value pairs. At least the driver I co-wrote works that > way. > > I would be nice to have a doc area where we write this kind of stuff down. > > Gary > > On Tue, Jul 26, 2016 at 10:33 AM, Ralph Goers <[email protected]> > wrote: > >> Has anybody asked for that? To be honest, the JNDI API is one of the >> worst designs ever. It is impossible not to get an exception during normal >> operation. If I was going to implement “advanced” configuration I would be >> looking at zookeeper or something similar. >> >> Ralph >> >> On Jul 26, 2016, at 10:27 AM, Gary Gregory <[email protected]> >> wrote: >> >> To load different bits of configuration. Or the whole thing. The question >> is: How should JNDI be used to configure Log4j. It could be the whole >> config and our config lookup could be made to use JNDI or it could be bits >> and pieces of different components like this last request. >> >> Gary >> >> On Tue, Jul 26, 2016 at 9:02 AM, Ralph Goers <[email protected]> >> wrote: >> >>> To do what? I’ve never really used JNDI for much (except when I >>> actually wanted to access LDAP). >>> >>> Ralph >>> >>> On Jul 26, 2016, at 8:49 AM, Gary Gregory <[email protected]> >>> wrote: >>> >>> Any thoughts on a JNDI configuration epic? >>> >>> Gary >>> >>> ---------- Forwarded message ---------- >>> From: Nicolò Chieffo (JIRA) <[email protected]> >>> Date: Tue, Jul 26, 2016 at 4:59 AM >>> Subject: [jira] [Updated] (LOG4J2-1478) SMTP appender which uses JNDI >>> To: [email protected] >>> >>> >>> >>> [ >>> https://issues.apache.org/jira/browse/LOG4J2-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel >>> ] >>> >>> Nicolò Chieffo updated LOG4J2-1478: >>> ----------------------------------- >>> Attachment: JndiSmtpManager262.java >>> JndiSmtpAppender262.java >>> >>> I don't know if this can be useful to you, but I attached 2 files that >>> are based on 2.6.2 code for SmtpAppender and SmptManager. >>> In the configuration you can pass a parameter jndiName="" to indicate >>> that you need a Jndi Mail Session >>> >>> > SMTP appender which uses JNDI >>> > ----------------------------- >>> > >>> > Key: LOG4J2-1478 >>> > URL: https://issues.apache.org/jira/browse/LOG4J2-1478 >>> > Project: Log4j 2 >>> > Issue Type: Wish >>> > Components: Appenders >>> > Reporter: Nicolò Chieffo >>> > Attachments: JndiSmtpAppender262.java, JndiSmtpManager262.java >>> > >>> > >>> > It would be useful to have an additional option to the SMTP appender, >>> which uses a JNDI name to configure the smtp server >>> >>> >>> >>> -- >>> This message was sent by Atlassian JIRA >>> (v6.3.4#6332) >>> >>> >>> >>> -- >>> E-Mail: [email protected] | [email protected] >>> Java Persistence with Hibernate, Second Edition >>> <http://www.manning.com/bauer3/> >>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >>> Spring Batch in Action <http://www.manning.com/templier/> >>> Blog: http://garygregory.wordpress.com >>> Home: http://garygregory.com/ >>> Tweet! http://twitter.com/GaryGregory >>> >>> >>> >> >> >> -- >> E-Mail: [email protected] | [email protected] >> Java Persistence with Hibernate, Second Edition >> <http://www.manning.com/bauer3/> >> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >> Spring Batch in Action <http://www.manning.com/templier/> >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory >> >> >> > > > -- > E-Mail: [email protected] | [email protected] > Java Persistence with Hibernate, Second Edition > <http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > > > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
