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

Refactorized the code #9

Merged
merged 11 commits into from Apr 6, 2017
Merged

Refactorized the code #9

merged 11 commits into from Apr 6, 2017

Conversation

oscarotero
Copy link
Member

This change uses strtr instead sprintf to generate the messages, providing more flexibility to customize the output format.
It also fixes some bugs like append the uri's query to the path or replace %h value (ip) by %v (virtual host) instead prepend it.

*/
private function getFormat()
{
$message = $this->vhost ? '%v' : '%h';
Copy link
Contributor

Choose a reason for hiding this comment

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

Vhost info should not substitute the IP info, it should prepend it.

Copy link
Member Author

Choose a reason for hiding this comment

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

the example in https://httpd.apache.org/docs/2.4/logs.html#accesslog (Section "Virtual Hosts") contains the following format:

LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I'm interested in vhost_combined format defined in debian package: https://anonscm.debian.org/cgit/pkg-apache/apache2.git/tree/debian/config-dir/apache2.conf?h=jessie#n206

@oscarotero oscarotero merged commit f246c6a into master Apr 6, 2017
@oscarotero oscarotero deleted the refactorized branch April 6, 2017 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants