Skip to content

Chef cookbook for adding a global custom log and log format directives to apache

License

Notifications You must be signed in to change notification settings

widgit-cookbooks/apache2-global-customlog

Repository files navigation

apache2-global-customlog-cookbook

Very simple cookbook that sets up global CustomLog and Logformat directives for apache2.

This will set a customlog that applies to all vhosts that don't define their own CustomLog, as well as some LogFormat directives that can be reused by CustomLog directives in vhost configurations.

Replaces apache's other-vhosts-access-log configuration file.

Supported Platforms

ubuntu, debian, possibly other unices (untested)

Attributes

Key Type Description Default
['apache2-global-customlog']['location'] String Default location to log to (file or pipe) /var/log/apache2/other-vhosts-access.log
['apache2-global-customlog']['format'] String Log format for the customlog (format string or alias) common
['apache2-global-customlog']['log-formats'] Hash Log formats to define ("alias": "format") - *Note:* Quotes must be escaped in format. {}

Usage

apache2-global-customlog::default

Include apache2-global-customlog in your node's run_list:

{
  "run_list": [
    "recipe[apache2-global-customlog::default]"
  ]
}

Depends on the apache2 cookbook.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: Simon Detheridge ([email protected])

About

Chef cookbook for adding a global custom log and log format directives to apache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages