You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mohit Anchlia <mo...@gmail.com> on 2009/09/09 22:49:24 UTC

[users@httpd] Excluding String from access log

I need to exclude below string (as an example) from access log. Is
there a way I can use CustomLog and do that?

[Wed Sep 09 13:20:47 2009] [info] [client 10.4.1.41] Connection closed
to child 4 with abortive shutdown (server )

[Wed Sep 09 13:20:47 2009] [info] [client 28.20.40.241] Connection to
child 1 established (server)

[Wed Sep 09 13:20:47 2009] [info] Seeding PRNG with 136 bytes of entropy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Excluding String from access log

Posted by André Warnier <aw...@ice-sa.com>.
Mohit,

Mohit Anchlia wrote:
> All I want is to remove that "info" message from the access log. So
> basically I don't want to see that in access or error log
> 

read this : http://httpd.apache.org/docs/2.2/mod/core.html#loglevel

You can stop all [info] messages from appearing in the error log.
As to the access log, these messages should anyway not appear there, 
unless you did something stupid like point both access log and error log 
to the same file.

Apart from that, Apache is open source, and you are welcome to download 
the source, modify it, and remove any kind of message from the logs that 
you want.

What other people here are trying to tell you (but you don't seem to 
want to listen) is that for this kind of thing, it is easier to "filter" 
your logfiles after the fact, using a separate script.
Or filtering them in real-time, by piping them through your own filter.

See for example here (the section "pipe") :
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Excluding String from access log

Posted by Mohit Anchlia <mo...@gmail.com>.
All I want is to remove that "info" message from the access log. So
basically I don't want to see that in access or error log

On Wed, Sep 9, 2009 at 7:12 PM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Sep 9, 2009 at 6:20 PM, Mohit Anchlia<mo...@gmail.com> wrote:
>> These go as "info" in access log
>
> It's pretty unusual for error log entries to end up in your access
> log. Is that what you're actually claiming?  We could already see that
> they were "info" level.
>
> These are two distinctly different log files.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Excluding String from access log

Posted by Eric Covener <co...@gmail.com>.
On Wed, Sep 9, 2009 at 6:20 PM, Mohit Anchlia<mo...@gmail.com> wrote:
> These go as "info" in access log

It's pretty unusual for error log entries to end up in your access
log. Is that what you're actually claiming?  We could already see that
they were "info" level.

These are two distinctly different log files.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Excluding String from access log

Posted by Mohit Anchlia <mo...@gmail.com>.
These go as "info" in access log

On Wed, Sep 9, 2009 at 3:03 PM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Sep 9, 2009 at 4:49 PM, Mohit Anchlia<mo...@gmail.com> wrote:
>> I need to exclude below string (as an example) from access log. Is
>> there a way I can use CustomLog and do that?
>>
>> [Wed Sep 09 13:20:47 2009] [info] [client 10.4.1.41] Connection closed
>> to child 4 with abortive shutdown (server )
>>
>> [Wed Sep 09 13:20:47 2009] [info] [client 28.20.40.241] Connection to
>> child 1 established (server)
>>
>> [Wed Sep 09 13:20:47 2009] [info] Seeding PRNG with 136 bytes of entropy
>
>
> This looks like an ErrorLog.  You could write a simple script to
> discard these messages and write your error logs via the piped logging
> mechanism, if simply filtering them out during some post-processing
> isn't sufficient.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Excluding String from access log

Posted by Eric Covener <co...@gmail.com>.
On Wed, Sep 9, 2009 at 4:49 PM, Mohit Anchlia<mo...@gmail.com> wrote:
> I need to exclude below string (as an example) from access log. Is
> there a way I can use CustomLog and do that?
>
> [Wed Sep 09 13:20:47 2009] [info] [client 10.4.1.41] Connection closed
> to child 4 with abortive shutdown (server )
>
> [Wed Sep 09 13:20:47 2009] [info] [client 28.20.40.241] Connection to
> child 1 established (server)
>
> [Wed Sep 09 13:20:47 2009] [info] Seeding PRNG with 136 bytes of entropy


This looks like an ErrorLog.  You could write a simple script to
discard these messages and write your error logs via the piped logging
mechanism, if simply filtering them out during some post-processing
isn't sufficient.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org