Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log4j config, how to add custom appender #529

Open
bilsch opened this issue Dec 17, 2015 · 1 comment · May be fixed by #1234
Open

log4j config, how to add custom appender #529

bilsch opened this issue Dec 17, 2015 · 1 comment · May be fixed by #1234
Labels

Comments

@bilsch
Copy link

bilsch commented Dec 17, 2015

We are looking to add a modification to the log4j appender type used to get the rolling file appender vs the daily rolling file appender.

http://grokbase.com/t/gg/elasticsearch/14chrn08rj/pruning-logs-how-to-get-maxbackupindex-to-work

From what I see in the template the only change we can make is to alter the already-configured appender. Is that right?

Is there a way to inject a modified appender via hiera? I'm not sure if this is the right yml structure for hieradata but this is what I came up with to try out/test:

    logging_config:
      rollingFile:
        file:
          type: rollingFile
          file: "${path.logs}/${cluster.name}.log"
          maxBackupIndex: 10
          layout:
            type: pattern
            conversionPattern: '"[%d{ISO8601}][%-5p][%-25c] %m%n"'

Not sure if the nested yml structure is the right way to go. The elasticsearch.yml renders something like file.type: rollingFile instead

@electrical
Copy link

Hi,

The logging file is something that i still want to improve but haven't had the time yet.
This use case will certainly help me with thinking up improvements for it.
more idea's / PR's are always welcome :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment