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

create settings to rotate service.log #11

Closed
wants to merge 1 commit into from
Closed

Conversation

weslleycamilo
Copy link

@weslleycamilo weslleycamilo commented Feb 7, 2019

# services.log
#
log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.rollingFile.File=$/var/log/rundeck/service.log
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix it.

Copy link

@raphapr raphapr Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weslleycamilo the commit was pushed?

Copy link

@raphapr raphapr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of log file configurations below:

rundeck.jobs.log, rundeck.api.log,rundeck.access.log etc.

log4j.appender.rollingFile.File=$/var/log/rundeck/service.log
log4j.appender.rollingFile.layout=org.apache.log4j.PatternLayout
log4j.appender.rollingFile.layout.ConversionPattern=%d{ISO8601} - %m%n
log4j.appender.rollingFile.MaxFileSize=10MB
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice parametrize log4j.appender.rollingFile.MaxFileSize and log4j.appender.rollingFile.MaxBackupIndex. We can change these values in the future, what do you think?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about 200mb rotating for each 7 days as default values?

Copy link
Author

@weslleycamilo weslleycamilo Feb 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well there is just two parameters like this which one I've updated and another one inserted.. So I'm gonna make some tests before to see if it works fine, but one ideia I had is to unify all the settings in the max of two settings and put rundeck.* to work with all the logs.

  • It will make more simple
  • It is logs which with your suggestion of 7 days of retention it would be enough for all the logs.
  • It will make possible to rotate all the logs

So as you said it's tests might will be boring as I've to restart rundeck, so I'm gonna do its first test and make sure it works to go on to the next steps.

what do you think @raphapr ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you r saying but I'm afraid that violate the principle of ansible roles. A user may want to configure any log file through the role parameters, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeaah he will still be able to do that man.. right ? my proposal is to simplify the actual configs to all related logs. rundeck.jobs.log, rundeck.api.log,rundeck.access.log etc.

so if anyone wants to create a new one it will be possible to create.

Anyway I don't know if it is possible and I am just gonna give it a try.

@mtulio
Copy link

mtulio commented Feb 11, 2019

#6

@raphapr
Copy link

raphapr commented Feb 11, 2019

@mtulio 2017? good memory 🤣

@weslleycamilo weslleycamilo deleted the update-log4j branch January 22, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants