Re: HTTPAPPENDER
Yes, that blog post is incorrect. The blog post links to our Jira issue. I have updated that to add the recommendation that user’s use JsonLayout and mention that the SocketServers are still supported. The blog post doesn’t allow comments and I see no other way to correct them. It is rather annoying since we had this discussion with Jordan at the time. However, the blog entry was posted on April 20 and he only came to understand that the problem was with SerializedLayout on April 28. He never updated it. Ralph > On Oct 24, 2017, at 12:58 PM, Mikael Ståldalwrote: > > Elasic.co got it wrong in that blog post. The problem is not SockerAppender, > the problem is SerializedLayout. > > Maybe people were confusing the two, since SerializedLayout used to be > default layout for SockerAppender. But it has always been possible to > configure SockerAppender to use another layout. And since Log4j 2.9.0, > SerializedLayout is deprecated and no longer default in any appender. > > You can use SockerAppender with JsonLayout for sending log events to Logstash. > > > On 2017-10-24 08:25, itsg...@gmail.com wrote: >> Thanks. We have a situation where we have a thick client application (Java >> Swing) and we want the client side logs to be pushed to server side so that >> we can use for analysis. Socketappender is one option but looks like there >> are plan to depricate socket appenders because of security issues. Please >> refer to below >> https://www.elastic.co/blog/log4j-input-logstash >> -- >> Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html >> - >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >> For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: HTTPAPPENDER
If you want to use the SocketAppender, I'd recommending adding the appropriate Jackson dependencies and using the JSON layout. I have a desire to eventually implement a similar layout using Apache Avro and/or Apache Thrift which would be a lot faster, though either way, just stick with anything other than plain Java serialization and you should generally be fine with security (though I'd avoid XML unless you know how to disable all the helpful "features" that come with typical XML processors that are gaping security holes). On 24 October 2017 at 08:42, itsg...@gmail.comwrote: > Thanks for your response. > > > > -- > Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > -- Matt Sicker
Re: HTTPAPPENDER
Thanks for your response. -- Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: HTTPAPPENDER
There are no plans to deprecate socket appenders. We only recommend the SerializedLayout not be used. We moved the Socket server out of core because it is meant to be a sample for users to modify to meet their needs, not really use as is. Ralph > On Oct 23, 2017, at 11:25 PM, "itsg...@gmail.com"wrote: > > Thanks. We have a situation where we have a thick client application (Java > Swing) and we want the client side logs to be pushed to server side so that > we can use for analysis. Socketappender is one option but looks like there > are plan to depricate socket appenders because of security issues. Please > refer to below > https://www.elastic.co/blog/log4j-input-logstash > > > > > -- > Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: HTTPAPPENDER
Thanks. We have a situation where we have a thick client application (Java Swing) and we want the client side logs to be pushed to server side so that we can use for analysis. Socketappender is one option but looks like there are plan to depricate socket appenders because of security issues. Please refer to below https://www.elastic.co/blog/log4j-input-logstash -- Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: HTTPAPPENDER
My primary use case for that appender would be posting a message to a Slack webhook. For example, if my team's notification channel for monitoring services and such has a webhook URL, I can POST to that URL with a PatternLayout using the JSON escape of a message laid out like {"message": "%enc{%m}{JSON}"}. So, for a more complete example: https://slack.com/blah-blah-blah;> Then, I'd use: Marker SLACK = MarkerManager.getMarker("SLACK"); logger.info(SLACK, "Hello, team!"); The use of a marker here makes it so I can specify a log message should go to Slack regardless of which logger name it comes from. A similar use case could be used with the SMTP appender and other networked ones where you only care about urgent log messages. On 23 October 2017 at 22:58, itsg...@gmail.comwrote: > Is there a good example to use the log4j httpappender. I have seen example > for socketappender and tried it. I want to compare between socket appender > and http appender so that we can choose what will be best fit for our > product. > > > > -- > Sent from: http://apache-logging.6191.n7.nabble.com/Log4j-Users-f4.html > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > -- Matt Sicker
Re: HTTPAppender
On Jul 24, 2007, at 6:52 PM, Adrian Blakey wrote: Find attached an HTTPAppender. This is a RESTful appender that uses the Atom Publishing protocol to post a log record. First a few process items: Please create a Bugzilla issue and then after creating it, add the appender as a patch. Please replace the ASF copyright notice with the ASF license header from http://www.apache.org/legal/src- headers.html. Please review the individual contributors license (http://www.apache.org/licenses/icla.txt) and consider if you satisfy the conditions (the work is your original creation, etc). Now for the technical: I would suggest splitting the appender into an HTTPAppender and an ATOMLayout. That would allow you to reuse the appender with an RSS or other layout. Adding a JDOM dependency isn't desirable. I'd do ATOMLayout using a SAX-based XML serializer (see http://www.javazoom.net/services/ newsletter/xmlgeneration.html for an example). I haven't tried the JAXP 1.1's trick of using an XSLT processor as a serializer, but it avoids adding an dependency on Xalan or Xerces. If you don't want to do that and just submit it as is, that would be fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPAppender
Curt Arnold wrote: Thank you for the input! I'll do as suggested. On Jul 24, 2007, at 6:52 PM, Adrian Blakey wrote: Find attached an HTTPAppender. This is a RESTful appender that uses the Atom Publishing protocol to post a log record. First a few process items: Please create a Bugzilla issue and then after creating it, add the appender as a patch. Please replace the ASF copyright notice with the ASF license header from http://www.apache.org/legal/src-headers.html. Please review the individual contributors license (http://www.apache.org/licenses/icla.txt) and consider if you satisfy the conditions (the work is your original creation, etc). Now for the technical: I would suggest splitting the appender into an HTTPAppender and an ATOMLayout. That would allow you to reuse the appender with an RSS or other layout. Adding a JDOM dependency isn't desirable. I'd do ATOMLayout using a SAX-based XML serializer (see http://www.javazoom.net/services/newsletter/xmlgeneration.html for an example). I haven't tried the JAXP 1.1's trick of using an XSLT processor as a serializer, but it avoids adding an dependency on Xalan or Xerces. If you don't want to do that and just submit it as is, that would be fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]