[ 
https://issues.apache.org/jira/browse/LOG4J2-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539337#comment-17539337
 ] 

Volkan Yazici commented on LOG4J2-3508:
---------------------------------------

{quote}I believe most organizations will be hesitating to use sources from 
outside the core libraries, since they might not be maintained eventually
{quote}
I can proudly state that is certainly not the case. On the contrary, that is 
how I became a PMC myself. I used to maintain 
[log4j2-logstash-layout|https://github.com/vy/log4j2-logstash-layout] and 
[log4j2-redis-appender|https://github.com/vy/log4j2-redis-appender] plugins. 
The former has been accepted to the core due to its wide usage in the community 
and I still maintain the latter in its own repository.

We had discussed this feature internally and decided to not accept it at this 
stage. We have appreciated your kind request and gentle way of communicating it 
rather than dropping a PR on GitHub. We think this feature best fits into its 
own repository maintained by its authors. If you have any questions on Log4j, 
we would be more than happy to help.

I will close this ticket. Feel free to re-open it if you have objections.

> Add a signature appender to the log4j2 core
> -------------------------------------------
>
>                 Key: LOG4J2-3508
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3508
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Appenders
>            Reporter: Simon Huang
>            Priority: Minor
>
> h2. Goal
> Merge our implementation of a Signature appender into the log4j2 core.
> h2. What is a signature appender?
> Hello log4j2 contributors,
> I am a working student at Siemens and my superiours were looking for a way to 
> add a signature to their logs. The solution that we came up with is an outer 
> appender that works similar to the failover appender, i.e. it adds a 
> signature and delegates the appending to another appender.
> You can see our solution at 
> [github|https://github.com/simon-hng-smns/log4j2_signature_appender/tree/main]
>  as wenn as an [example 
> implementation|https://github.com/simon-hng-smns/log4j2_signature_appender/tree/example-implementation].
> We would appreciate any and all feedback, and hope you can guide us to 
> necessary changes, in order to incorporate our appender.
> h2. How does it work?
> The SignatureAppender takes in an inner appender, which can now use the 
> {{%sign}} PatternConverter.
> {code:xml}
>     <Appenders>
>         <SignatureAppender name="signatureAppender"
>                            signatureAlgorithm="SHA256withRSA"
>                            pathToKeyStore="signatureKeyStore.p12"
>                            keyStorePassword="password"
>         >
>             <Console name="console">
>                 <PatternLayout pattern="[%sign] %m%n"/>
>             </Console>
>         </SignatureAppender>
>     </Appenders>
> {code}
> h3. Creating the signature
> The signature is created using the internal java class {{Signature}}, which 
> gets a formatted message and the last signature and signs like this 
> {code:java}
> Signature.update(message + lastSignature)
> {code}
> h3. In general the steps are the following:
>  # SignatureAppender gets LogEvent creates the formatted message.
>  # Using this formatted message and the lastSignature, a signature is created 
> which we use to create a LogEvent with the signature as a property
>  # This new LogEvent is then send to the inner appender, where it is used by 
> the SignaturePatternConverter
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to