Logging in scrip conditions?

Have a scrip that’s not firing for some reason. Want to write to the
rt.log with some debug info, but the Logger doesn’t seem to be
accessible from the scrip conditions. Of course, my Perl-fu is pretty
abyssmal. This possible?

GravyFace,

I usually do this in my Dev environment where I first change the 

RT_SiteConfig.pm file to turn on logging:
“Set($DevelMode, ‘1’);”. *This is OFF in production as it would make
everything run REALLY slow.

 Then I insert the following code whereever I want to display 

something in the log:

  $RT::Logger->info("Resolution Type  NOT SET!");

That should do it. Hope this helps.

Kenn
LBNLOn 6/11/2009 11:08 AM, GravyFace wrote:

Have a scrip that’s not firing for some reason. Want to write to the
rt.log with some debug info, but the Logger doesn’t seem to be
accessible from the scrip conditions. Of course, my Perl-fu is pretty
abyssmal. This possible?


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Ah. Forgot to enable logging; thanks Ken.On Thu, Jun 11, 2009 at 2:39 PM, Ken Crocker kfcrocker@lbl.gov wrote:

GravyFace,

I usually do this in my Dev environment where I first change the

RT_SiteConfig.pm file to turn on logging:

"Set($DevelMode, '1');". This is OFF in production as it would make

everything run REALLY slow.

 Then I insert the following code whereever I want to display something

in the log:

  $RT::Logger->info("Resolution Type  NOT SET!");

That should do it. Hope this helps.

Kenn
LBNL

On 6/11/2009 11:08 AM, GravyFace wrote:

Have a scrip that’s not firing for some reason. Want to write to the
rt.log with some debug info, but the Logger doesn’t seem to be
accessible from the scrip conditions. Of course, my Perl-fu is pretty
abyssmal. This possible?


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com