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

LogFormat Directive not honored #863

Closed
patricklee2 opened this issue Jul 11, 2019 · 2 comments
Closed

LogFormat Directive not honored #863

patricklee2 opened this issue Jul 11, 2019 · 2 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@patricklee2
Copy link

patricklee2 commented Jul 11, 2019

using 7.3-apache
tried to change the format of the log

in apache2.conf
Added

LogFormat "%t %h \"%r\" %>s %b  \"%{Referer}i\" \"%{User-agent}i\" \"%{Disguised-Host}i\"" tuxedoformat'
CustomLog /dev/stderr tuxedoformat

but format was not honored

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Jul 11, 2019
@wglambert
Copy link

wglambert commented Jul 11, 2019

You want /proc/1/fd/2 instead of /dev/stderr

#811 (comment)
tl;dr: using /dev/stderr redirects to /proc/self/fd/2 which redirects to /dev/pts/0
And docker logs reads from /proc/1/fd/{1,2} (when the container is -d or "detached")

For further help you could ask over at Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repositories are for issues with the image and not necessarily for questions of usability

@allofmex
Copy link

Can't explain why, but it seems to be important to use an own name instead of existing ones (at least in virtual host file).

This

<VirtualHost *:80>
    LogFormat "%v:%p ..." vhost_combined
    CustomLog /proc/self/fd/1 vhost_combined
</VirtualHost>

get's ignored, but

    LogFormat "%v:%p ..." vhost_combined_new
    CustomLog /proc/self/fd/1 vhost_combined_new

works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants