Comments (5)
I think it's just a configuration issue. Here's a sample project that should get you started:
from log4j-s3-search.
Here's how to exercise it after expanding:
cd <where log4j2.zip was expanded>
mvn install
cd target
java -cp log4j-s3-search-log4j2-sample.jar example.App
The output of running the program:
15:49:30,852 [main] INFO example.App - Hello from Main!
15:49:30,857 [main] INFO example.App - Another round through the loop!
15:49:30,857 [main] WARN example.App - This is a warning!
15:49:30,857 [main] ERROR example.App - And this is an error!!!
15:49:33,870 [main] INFO example.App - Another round through the loop!
15:49:33,870 [main] WARN example.App - This is a warning!
15:49:33,870 [main] ERROR example.App - And this is an error!!!
15:49:36,877 [main] INFO example.App - Another round through the loop!
15:49:36,877 [main] WARN example.App - This is a warning!
15:49:36,877 [main] ERROR example.App - And this is an error!!!
15:49:39,884 [main] INFO example.App - Another round through the loop!
15:49:39,884 [main] WARN example.App - This is a warning!
15:49:39,886 [main] ERROR example.App - And this is an error!!!
15:49:42,898 [main] INFO example.App - Another round through the loop!
15:49:42,898 [main] WARN example.App - This is a warning!
15:49:42,898 [main] ERROR example.App - And this is an error!!!
LoggingEventCache com.van.logging.LoggingEventCache@27c6e487: shutting down
LoggingEventCache: Executor service terminated within timeout: true
CapacityBasedBufferMonitor: shutting down.
from log4j-s3-search.
Can you please explain the sentence "Exclude all the transitive dependencies to external libs so we get to specify the versions we want ", that you have written in pom.xml
from log4j-s3-search.
Sure. So when I built appender-core, for example, I used com.amazonaws:aws-java-sdk:1.11.613
(see https://github.com/bluedenim/log4j-s3-search/blob/master/pom.xml#L46-L50).
So if you don't change anything, when you depend on com.therealvan:appender-log4j2:2.8.3
, it depends on com.therealvan:appender-core:2.8.3
, and that depends on com.amazonaws:aws-java-sdk:1.11.613
. So the transitive dependency of your program now includes com.amazonaws:aws-java-sdk:1.11.613.
When I do this:
<exclusion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</exclusion>
It removes com.amazonaws:aws-java-sdk:1.11.613
from your final project. This will allow you to now add the version of com.amazonaws:aws-java-sdk-s3
that you want. Maybe you want a newer version of AWS S3 SDK than 1.11.613. Instead of waiting for me to update my library, you can:
- Add the exclude above, then
- Add the dependency to the version of AWS S3 you want (maybe 1.11.907) in your pom.xml
https://www.educba.com/maven-exclude-dependency/ explains it better if you want details.
from log4j-s3-search.
Thank you! My issue got solved it was because of not using latest dependencies of log4j2 and also for not included maven shade plugin in pom.xml
from log4j-s3-search.
Related Issues (20)
- Minio support. HOT 3
- AWS S3 - lack of data compression HOT 3
- Thread Count - keep increase HOT 2
- Cannot end publish with com.van.logging.azure.BlobPublishHelper HOT 3
- System out in S3PublishHelper.java HOT 2
- Cannot end publish with com.van.logging.aws.S3PublishHelper HOT 13
- Thread pool executer shutdown not being called. HOT 3
- Compatibility with / Benchmarking with Asynchronous logging HOT 1
- Security dependencies bump HOT 2
- Call to Exception.printStackTrace() causes Log4j2 to split stacktrace logs HOT 2
- Support AWS IRSA. HOT 3
- Support to get values for log4j2Appender configurations from environment variables HOT 5
- Refresh "s3Path" setting for S3Appender based on configuration HOT 13
- spark-submit hangs after successful job completion HOT 11
- LoggingEventCache shutdown hangs with <stagingBufferAge> set HOT 6
- Issues preventing logging to storage grid HOT 11
- While using the log4j2.xml configurations for Gcp bucket I am getting invalid attributes error HOT 7
- Elastic Search HOT 9
- Support Property Substitution on Path/Prefix. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4j-s3-search.