You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Michael D. Berger" <m....@ieee.org> on 2016/01/01 03:55:39 UTC
[users@httpd] LogMessage not working
I am converting my old complex httpd.config from 2.2 to 2.4, and
having numerous problems. I added mod_log_debug, but I cannot get
LogMessage to work. Here is one of numerous things I tried inside
a VirtualHost that is working up to a point:
<Location "/">
LogMessage "herebefore02 httpdViMn" hook=type_checker expr=true
</Location>
The message does not appear the log files. I have seen on the web
that I have to "enable" mod_log_debug, but I have not seen how to
do that.
Thanks for any advice. Perhaps there is another way to print
things from various parts of the config file?
Happy New Year!
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
http://www.rosemike.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] LogMessage not working
Posted by "Michael D. Berger" <m....@ieee.org>.
> -----Original Message-----
> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
> Sent: Friday, January 01, 2016 19:07
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] LogMessage not working
>
> Am 01.01.2016 um 22:55 schrieb Michael D. Berger:
> >> -----Original Message-----
> >> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
> >> Sent: Friday, January 01, 2016 05:56
> >> To: users@httpd.apache.org
> >> Subject: Re: [users@httpd] LogMessage not working
> >>
> >> Am 01.01.2016 um 03:55 schrieb Michael D. Berger:
> >>> I am converting my old complex httpd.config from 2.2 to 2.4, and
> >>> having numerous problems. I added mod_log_debug, but I
> cannot get
> >>> LogMessage to work. Here is one of numerous things I tried
> >> inside a
> >>> VirtualHost that is working up to a point:
> >>>
> >>> <Location "/">
> >>> LogMessage "herebefore02 httpdViMn"
> hook=type_checker expr=true
> >>> </Location>
> >>>
> >>> The message does not appear the log files. I have seen
> on the web
> >>> that I have to "enable" mod_log_debug, but I have not seen
> >> how to do
> >>> that.
> >>>
> >>> Thanks for any advice. Perhaps there is another way to
> >> print things
> >>> from various parts of the config file?
> >>
> >> How is LogLevel set in your config?
> >>
> >> Quoting from the docs, the messages logged by mod_log_debug "are
> >> logged at loglevel info." So if your server runs with "LogLevel
> >> warn", they won't be logged. In that case use
> >>
> >> LogLevel warn log_debug:info
> >>
> >> instead, and start wth a simple
> >>
> >> <Location "/">
> >> LogMessage "herebefore02 httpdViMn"
> >> </Location>
> >>
> >> before trying more complex constructs.
> >>
> >> Regards,
> >>
> >> Rainer
> >
> > Thanks, but the above suggestions did not work.
> >
> > I also tried:
> >
> > LogLevel info
> >
> > which also didn't work. I did follow your suggestion for a
> simpler message.
> > FWIW, I forgot to mention that I am on Fedora 23.
> >
> > Any other suggestions?
>
> Do your requests actually hit the right vhost, the one into
> which you had put the LogMessage? Can you see the request in
> the access log if you add a separate access log in the same vhost?
>
> Or in case you put the LogMessage into the global server:
> could it be that your request hits a vhost instead?
>
> Regards,
>
> Rainer
Yes that was it! I was hitting the wrong vhost, which I confirmed
by commenting out all the other vhosts. Problem solved.
Thanks,
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
http://www.rosemike.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] LogMessage not working
Posted by Rainer Jung <ra...@kippdata.de>.
Am 01.01.2016 um 22:55 schrieb Michael D. Berger:
>> -----Original Message-----
>> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
>> Sent: Friday, January 01, 2016 05:56
>> To: users@httpd.apache.org
>> Subject: Re: [users@httpd] LogMessage not working
>>
>> Am 01.01.2016 um 03:55 schrieb Michael D. Berger:
>>> I am converting my old complex httpd.config from 2.2 to 2.4, and
>>> having numerous problems. I added mod_log_debug, but I cannot get
>>> LogMessage to work. Here is one of numerous things I tried
>> inside a
>>> VirtualHost that is working up to a point:
>>>
>>> <Location "/">
>>> LogMessage "herebefore02 httpdViMn" hook=type_checker expr=true
>>> </Location>
>>>
>>> The message does not appear the log files. I have seen on the web
>>> that I have to "enable" mod_log_debug, but I have not seen
>> how to do
>>> that.
>>>
>>> Thanks for any advice. Perhaps there is another way to
>> print things
>>> from various parts of the config file?
>>
>> How is LogLevel set in your config?
>>
>> Quoting from the docs, the messages logged by mod_log_debug
>> "are logged at loglevel info." So if your server runs with
>> "LogLevel warn", they won't be logged. In that case use
>>
>> LogLevel warn log_debug:info
>>
>> instead, and start wth a simple
>>
>> <Location "/">
>> LogMessage "herebefore02 httpdViMn"
>> </Location>
>>
>> before trying more complex constructs.
>>
>> Regards,
>>
>> Rainer
>
> Thanks, but the above suggestions did not work.
>
> I also tried:
>
> LogLevel info
>
> which also didn't work. I did follow your suggestion for a simpler message.
> FWIW, I forgot to mention that I am on Fedora 23.
>
> Any other suggestions?
Do your requests actually hit the right vhost, the one into which you
had put the LogMessage? Can you see the request in the access log if you
add a separate access log in the same vhost?
Or in case you put the LogMessage into the global server: could it be
that your request hits a vhost instead?
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] LogMessage not working
Posted by "Michael D. Berger" <m....@ieee.org>.
> -----Original Message-----
> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
> Sent: Friday, January 01, 2016 05:56
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] LogMessage not working
>
> Am 01.01.2016 um 03:55 schrieb Michael D. Berger:
> > I am converting my old complex httpd.config from 2.2 to 2.4, and
> > having numerous problems. I added mod_log_debug, but I cannot get
> > LogMessage to work. Here is one of numerous things I tried
> inside a
> > VirtualHost that is working up to a point:
> >
> > <Location "/">
> > LogMessage "herebefore02 httpdViMn" hook=type_checker expr=true
> > </Location>
> >
> > The message does not appear the log files. I have seen on the web
> > that I have to "enable" mod_log_debug, but I have not seen
> how to do
> > that.
> >
> > Thanks for any advice. Perhaps there is another way to
> print things
> > from various parts of the config file?
>
> How is LogLevel set in your config?
>
> Quoting from the docs, the messages logged by mod_log_debug
> "are logged at loglevel info." So if your server runs with
> "LogLevel warn", they won't be logged. In that case use
>
> LogLevel warn log_debug:info
>
> instead, and start wth a simple
>
> <Location "/">
> LogMessage "herebefore02 httpdViMn"
> </Location>
>
> before trying more complex constructs.
>
> Regards,
>
> Rainer
Thanks, but the above suggestions did not work.
I also tried:
LogLevel info
which also didn't work. I did follow your suggestion for a simpler message.
FWIW, I forgot to mention that I am on Fedora 23.
Any other suggestions?
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
http://www.rosemike.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] LogMessage not working
Posted by Rainer Jung <ra...@kippdata.de>.
Am 01.01.2016 um 03:55 schrieb Michael D. Berger:
> I am converting my old complex httpd.config from 2.2 to 2.4, and
> having numerous problems. I added mod_log_debug, but I cannot get
> LogMessage to work. Here is one of numerous things I tried inside
> a VirtualHost that is working up to a point:
>
> <Location "/">
> LogMessage "herebefore02 httpdViMn" hook=type_checker expr=true
> </Location>
>
> The message does not appear the log files. I have seen on the web
> that I have to "enable" mod_log_debug, but I have not seen how to
> do that.
>
> Thanks for any advice. Perhaps there is another way to print
> things from various parts of the config file?
How is LogLevel set in your config?
Quoting from the docs, the messages logged by mod_log_debug "are logged
at loglevel info." So if your server runs with "LogLevel warn", they
won't be logged. In that case use
LogLevel warn log_debug:info
instead, and start wth a simple
<Location "/">
LogMessage "herebefore02 httpdViMn"
</Location>
before trying more complex constructs.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org