I cannot seem to get this to work:
@PluginElement("DisconnectionSqlCodes")
private String[] disconnectionSqlCodes;
Is it supposed? Where is the code is this done?
Gary
On Tue, Nov 13, 2018 at 1:55 PM Gary Gregory <[email protected]> wrote:
> This is to support configuring an Apache Commons DBCP connection pool
> through a org.apache.commons.dbcp2.PoolableConnectionFactory in our
> org.apache.logging.log4j.core.appender.db.jdbc.PoolingDriverConnectionSource,
> and there are a bunch of settings you can configure:
>
>
> https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/PoolableConnectionFactory.html
>
> And I'd rather support all settings than cherry-pick.
>
> Reference: https://issues.apache.org/jira/browse/LOG4J2-2505
>
> Gary
>
> On Tue, Nov 13, 2018 at 1:51 PM Ralph Goers <[email protected]>
> wrote:
>
>> You want to put a list of SQL statements into a log4j2 configuration? I’m
>> not sure why but something about that makes me uncomfortable.
>>
>> Ralph
>>
>> > On Nov 13, 2018, at 11:20 AM, Gary Gregory <[email protected]>
>> wrote:
>> >
>> > On Tue, Nov 13, 2018 at 9:47 AM Matt Sicker <[email protected]> wrote:
>> >
>> >> That might already be supported for comma-separated lists. IIRC, it
>> should
>> >> have conversions for Collection and array types.
>> >>
>> >
>> > I one case, a comma separated list would work for a list of numbers but
>> in
>> > the other case I need a list of SQL statements, so that would not work,
>> I'd
>> > need separate elements.
>> >
>> > Gary
>> >
>> >
>> >>
>> >> On Tue, 13 Nov 2018 at 10:44, Gary Gregory <[email protected]>
>> wrote:
>> >>
>> >>> Thank you Matt for the quick reply.
>> >>>
>> >>> Ah, I do want a null if there is nothing in the config for an
>> Integer, so
>> >>> it is perfect!
>> >>>
>> >>> What if I want a Collection<String> or something I can convert to
>> that?
>> >> How
>> >>> do I do that?
>> >>>
>> >>> Gary
>> >>>
>> >>> On Tue, Nov 13, 2018 at 9:36 AM Matt Sicker <[email protected]> wrote:
>> >>>
>> >>>> Yeah, it should work fine for those, too. If you don't specify a
>> >> default
>> >>>> field value, though, the default will be null instead of false/0 as
>> you
>> >>>> might expect with boxed types.
>> >>>>
>> >>>> On Tue, 13 Nov 2018 at 10:28, Gary Gregory <[email protected]>
>> >>> wrote:
>> >>>>
>> >>>>> Hi All:
>> >>>>>
>> >>>>> Will @PluginBuilderAttribute work OK for Boolean and Integers?
>> >>>>>
>> >>>>> Thank you,
>> >>>>> Gary
>> >>>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Matt Sicker <[email protected]>
>> >>>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Matt Sicker <[email protected]>
>> >>
>>
>>
>>