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

Add the ability to define logging #172

Merged
merged 1 commit into from
Oct 27, 2020
Merged

Conversation

coreone
Copy link
Contributor

@coreone coreone commented Jul 2, 2020

There was no way in the current settings to configure a log directory or an advanced logging configuration using channels and categories. This change adds the necessary configuration options and template changes to create a full-featured logging configuration. README and spec changes have been completed to document and test the change.

manifests/init.pp Outdated Show resolved Hide resolved
@coreone
Copy link
Contributor Author

coreone commented Jul 20, 2020

Is there anything else needed here?

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

This is just a quick read through. I need some time to properly review this. I'm mostly interested in the new file and how that would impact the various distros and permissions. Some acceptance tests would help with that.

manifests/logging/channel.pp Outdated Show resolved Hide resolved
spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
manifests/config.pp Outdated Show resolved Hide resolved
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Thanks for that test. I'll take a closer look later but just a small tip to optimize

spec/acceptance/logging_spec.rb Outdated Show resolved Hide resolved
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

My main concern is adding additional files, especially if they're unused by default.

One way to reduce that is to add a class dns::logging that adds the logging include to the main config and creates $logdir. Then you can require dns::logging in dns::logging::category and dns::logging::channel.

Other than that it looks good. Some more small coding style suggestions inline.

manifests/config.pp Outdated Show resolved Hide resolved
templates/log.channel.conf.erb Outdated Show resolved Hide resolved
spec/defines/dns_logging_channel_spec.rb Outdated Show resolved Hide resolved
templates/log.channel.conf.erb Outdated Show resolved Hide resolved
templates/log.channel.conf.erb Outdated Show resolved Hide resolved
manifests/config.pp Outdated Show resolved Hide resolved
spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
@coreone
Copy link
Contributor Author

coreone commented Sep 2, 2020

@ekohl I refactored this to append to named.conf instead of creating a new config file. I believe that was the last piece for this PR.

* Update README including fixing bare links
* Add spec and acceptance tests as needed
@coreone
Copy link
Contributor Author

coreone commented Oct 26, 2020

@ekohl I think this should be all set now. Let me know if there is anything else you would want updated before merging.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Thanks!

@ekohl ekohl merged commit d6eeb32 into theforeman:master Oct 27, 2020
@coreone coreone deleted the logging branch October 29, 2020 19:27
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