You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Anthony Gardner <cy...@yahoo.co.uk> on 2005/07/14 15:47:38 UTC

$r->notes and logging

Don't go mad with me ;)

I'm looking for a way to log particular msgs and saw
mod_log_config and Custom Log Formats.

Am I right in thinking that I can strip the error msg
contained in  ...

$r->notes("ALARM" => "sth very bad has happened") 

with ... 

%{ALARM}n 

placed in a custom log format string?

I hope this is the right place to post this. Sorry if
it isn't.

-Ants


		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

Re: $r->notes and logging

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Anthony Gardner wrote:
> Sure,
> 
> I'd like to log particular error msgs and I saw in the
> Apache manual mod_log_config. Amongst the
> configurations are things like %h - for host, %u - for
> user and things like that. There's an option %{foo}n -
> for notes.
> 
> I was wondering if that meant I could get sth out of
> $r->notes or $r->pnotes. As my example in the first
> mail.

$r->notes will do what you expect. $r->pnotes won't however.

$r->notes('foo','baz');

LogFormat "%{foo}n" foo
CustomLog "foo.log" foo


--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: $r->notes and logging

Posted by Anthony Gardner <cy...@yahoo.co.uk>.
Sure,

I'd like to log particular error msgs and I saw in the
Apache manual mod_log_config. Amongst the
configurations are things like %h - for host, %u - for
user and things like that. There's an option %{foo}n -
for notes.

I was wondering if that meant I could get sth out of
$r->notes or $r->pnotes. As my example in the first
mail.

I hope that's clearer.

As I don't have Apache set up at home yet to test
this, I was hoping to save time by asking the list.

-Ants

--- Tom Schindl <to...@gmx.at> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> could you explain in more detail what you are trying
> to achieve maybe
> it's because english is not my native language but I
> could not grasp
> anything from your information.
> 
> Tom
> 
> Anthony Gardner schrieb:
> > Don't go mad with me ;)
> > 
> > I'm looking for a way to log particular msgs and
> saw
> > mod_log_config and Custom Log Formats.
> > 
> > Am I right in thinking that I can strip the error
> msg
> > contained in  ...
> > 
> > $r->notes("ALARM" => "sth very bad has happened") 
> > 
> > with ... 
> > 
> > %{ALARM}n 
> > 
> > placed in a custom log format string?
> > 
> > I hope this is the right place to post this. Sorry
> if
> > it isn't.
> > 
> > -Ants
> > 
> > 
> > 		
> >
>
___________________________________________________________
> 
> > How much free photo storage do you get? Store your
> holiday 
> > snaps for FREE with Yahoo! Photos
> http://uk.photos.yahoo.com
> > 
> > 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird -
> http://enigmail.mozdev.org
> 
>
iD8DBQFC1rEZkVPeOFLgZFIRAnAVAJ9tVouo2seVnRgZkD7L2YqTlSVS8wCfcLqj
> eOBGr6kLm3gbdogt7AtmVvw=
> =+4mG
> -----END PGP SIGNATURE-----
> 



	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

Re: $r->notes and logging

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

could you explain in more detail what you are trying to achieve maybe
it's because english is not my native language but I could not grasp
anything from your information.

Tom

Anthony Gardner schrieb:
> Don't go mad with me ;)
> 
> I'm looking for a way to log particular msgs and saw
> mod_log_config and Custom Log Formats.
> 
> Am I right in thinking that I can strip the error msg
> contained in  ...
> 
> $r->notes("ALARM" => "sth very bad has happened") 
> 
> with ... 
> 
> %{ALARM}n 
> 
> placed in a custom log format string?
> 
> I hope this is the right place to post this. Sorry if
> it isn't.
> 
> -Ants
> 
> 
> 		
> ___________________________________________________________ 
> How much free photo storage do you get? Store your holiday 
> snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC1rEZkVPeOFLgZFIRAnAVAJ9tVouo2seVnRgZkD7L2YqTlSVS8wCfcLqj
eOBGr6kLm3gbdogt7AtmVvw=
=+4mG
-----END PGP SIGNATURE-----