bluedenim/log4j-s3-search

Not using Conversion Pattern configuration

lagostaveludo opened this issue · 1 comments

Hi you all!
First of all, thanks for this lib, it seems to work perfectly for what I needed.
Its just one thing I am having a hard time with: it seems not to be using conversionPattern config, so whenever files get uploaded to s3, they always use the same naming pattern. I am using the com.van.logging.log4j.Log4jAppender here and did a search throughout all the source code and seems that this property is never read anywhere. Am I missing something or indeed this property is not being currently used?

If by conversionPattern you're referring to
https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html#getConversionPattern(), I think that pattern is used to format the log messages (e.g. thread name, time, source file, log level, etc.), not the file name that is used to save into S3.

The format of the file name (really the suffix for the S3 key) to be used when saving content into S3 is designed to eliminate possible name clashes and also allow synchronizing with search results in Solr/Elasticsearch.