logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: How to use a PluginAttribute for a byte[]
Date Wed, 28 May 2014 01:58:26 GMT
Ooh that sounds pretty neat!


On 27 May 2014 19:38, Gary Gregory <garydgregory@gmail.com> wrote:

>
> I have a working experiment to encrypt a FileAppender on the fly, as
> opposed to after the fact, during a rollover for example (which is still
> valuable of course).
>
> To do this I added a CipherConfiguration (not in SVN, which wraps a
> Cipher) parameter to the FileAppender factory method. If null, no
> encryption of course.
>
> I am currently only doing symmetric encryption in my tests.
>
> Gary
>
>
> On Tue, May 27, 2014 at 8:01 PM, Remko Popma <remko.popma@gmail.com>wrote:
>
>> Interesting. May I ask what the plugin is for?
>>
>> Sent from my iPhone
>>
>> On 2014/05/28, at 8:45, Gary Gregory <garydgregory@gmail.com> wrote:
>>
>> I would like a Plugin I am currently writing to take a byte[] as the type
>> of a PluginAttribute.
>>
>> In the untyped version of our system, I would type the PluginAttribute as
>> a String and call getBytes() with an encoding that makes sense.
>>
>> How can we do this in our new type system?
>>
>> I could see the XML looking like
>>
>> attr="Value" where the type converters convert using String#getBytes()
>> but with which encoding? UTF8? The platform default.
>>
>> I also see:
>>
>> attr="Base64:0123...ABC"
>>
>> as being quite useful.
>>
>> Thoughts?
>>
>> Gary
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> 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: garydgregory@gmail.com | ggregory@apache.org
> 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
>



-- 
Matt Sicker <boards@gmail.com>

Mime
View raw message