avioconsulting / log4j2-sqs-appender Goto Github PK
View Code? Open in Web Editor NEWA custom appender for log4j2 which ships all the application logs to specified Amazon SQS queue in a specified region.
License: BSD 2-Clause "Simplified" License
A custom appender for log4j2 which ships all the application logs to specified Amazon SQS queue in a specified region.
License: BSD 2-Clause "Simplified" License
Hi team!
I have been a error to build project with mvn clean install.
The error is the following:
Failed to execute goal io.fabric8:docker-maven-plugin:0.43.0:start (docker-start) on project log4j2-sqs-appender: Execution docker-start of goal io.fabric8:docker-maven-plugin:0.43.0:start failed: No given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no external provider like Docker machine configured -> [Help 1]
Anyone have been this error?
Hey there. I'm not sure what we could be doing wrong; I've gone through every bit of documentation and every walkthrough about this sqs appender I can find, and I still can't get it to work.
Relevant data points:
1.1.0
.WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.amazonaws.util.XpathUtils (file:/var/resultflow/shared/aws-java-sdk-core-1.12.340.jar) to method com.sun.org.apache.xpath.internal.XPathContext.getDTMManager()
WARNING: Please consider reporting this to the maintainers of com.amazonaws.util.XpathUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I have taken a look at the aws-java-sdk-core
maven repo page, and it doesn't appear that there's anything (significantly) newer.
What am I missing?
Thank you for reading and your help!
--Garrett
Reassembling log messages that have been split into multiple SQS messages can be problematic, so can we use S3 to store those large messages?
I see two options:
I think both options are valid and could be supported so different methods of reading the messages can be supported. For instance, Logstash has an S3 input and an SQS input, but does not use the extended client library for Java, so it cannot read those references from the queue correctly.
Dear Sir,
I am using this log4j2-sqs-appender. we have the requirement to send large message to elastic more than 1MB. When I am using FIFO, getting the following exception.
ERROR 2023-02-07 14:16:08,152 [Log4j2-TF-8-AsyncLoggerConfig-5] [processor: ; event: ] com.avioconsulting.log4j.sqs.SqsManager: Failed to send message to SQS
java.lang.NullPointerException: null
at com.avioconsulting.log4j.sqs.SqsManager.send(SqsManager.java:93) [log4j2-sqs-appender-1.1.0.jar:?]
at com.avioconsulting.log4j.sqs.SqsAppender.append(SqsAppender.java:179) [log4j2-sqs-appender-1.1.0.jar:?]
at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:134) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:125) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:89) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:542) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.async.AsyncLoggerConfig.callAppenders(AsyncLoggerConfig.java:126) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:500) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:483) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.async.AsyncLoggerConfig.log(AsyncLoggerConfig.java:120) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.async.AsyncLoggerConfig.logToAsyncLoggerConfigsOnCurrentThread(AsyncLoggerConfig.java:168) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:112) [log4j-core-2.17.1.jar:2.17.1]
at org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:98) [log4j-core-2.17.1.jar:2.17.1]
at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168) [disruptor-3.4.2.jar:?]
at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) [disruptor-3.4.2.jar:?]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_352]
Please suggest.
Regards
Hello,
Is it possible to add a parameter to specify a optionnal endpoint.
By default, SQS is only available thru public address but we could create an endpoint in a VPC to access SQS thru it without transit in Internet.
For example, using the boto3 module with Python, it's possible to add an endpoint_url to specify created endpoint and bypass the automatic URL build process.
sqs = session.resource('sqs',endpoint_url='<VPC_AWS_service_endpoint>/')
Best regards
Not an issue yet, just a heavy concern.. We were trying to use a custom log4j2 Kafka appender on CloudHub and the conclusion (confirmed by Mulesoft support) was that it will never work, because the log4j2 is initialized by their application server's classloader, while the Kafka appender is shipped through our worker application, and the system classloader will not delegate to the application classloader. Well, they did not phrase it that technically, but the conclusion was that.
Now I wonder how your custom SQS log4j2 appender could behave otherwise, if it also gets packaged into the application worker's jar file. Won't we meet the exact same classloading issue when deploying to CloudHub? Or how did you get it to work, given how CloudHub works?
Note also that your artifacts are not rolled out to maven central.. Sure I can roll my own releases from source, but you might want to deploy to an official repo as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.