[rt-users] User Created Scrip Won't Run On Create
Kevin Falcone
falcone at bestpractical.com
Thu Feb 13 11:21:14 EST 2014
On Thu, Feb 13, 2014 at 07:46:35AM -0800, Ethan Hohensee wrote:
> I've seen examples online of people calling the logger using the
> /RT::Logger->error command/, but you are recommending using
> /RT->Logger->error/. Which of these is the correct way to call the logger?
They're equivalent
> I've been trying logging statements and neither of the methods above add
> anything to the debug logs. In my RT_SiteConfig.pm, I have this statement:
>
> /Set($LogToSyslog , 'debug');/
> Does debug function as a catch all for error, info, critical, warning, etc.?
Yes.
https://metacpan.org/pod/Log::Dispatch#LOG-LEVELS
> My Scrip is applied to the queue that I am sending to, and supposed to run
> at the TransactionCreate Stage. At this point, I am fairly certain that I
> have everything correct on the front end and I am starting to look for
> issues in my web stack. I am using Apache 2.2.15-29 and mod_perl-2.0.4-10.
A TransactionCreate Scrip with
On Create
User Defined
Blank
Custom Prepare
RT->Logger->error("Preparing!");
return 1;
Custom Commit
RT->Logger->error("Committing!");
return 1;
Logs my two messages to the log
[34474] [Thu Feb 13 16:17:06 2014] [error]: Preparing! ((eval 633):1)
[34474] [Thu Feb 13 16:17:06 2014] [error]: Committing! ((eval 637):1)
Since you're running 4.2, go to Admin -> Tools -> System Configuration
and read the Logging box and ensure you're reading the correct logs.
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140213/357246e7/attachment.sig>
More information about the rt-users
mailing list