[rt-users] RT Logger not logging to file

Izz Abdullah Izz.Abdullah at hibbett.com
Mon Oct 17 11:45:59 EDT 2011


UPDATE:
The $RT->Logger calls are running as expected within the other callback I have written as well as any .pm's I have added it to for testing.  There is something wrong with the structure for the ModifyQuery in which no matter what I put, it breaks the query and I cannot obtain any logging files out of the logger, even if that is the only thing within the ModifyQuery file.

Any other ideas?

From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Izz Abdullah
Sent: Friday, October 14, 2011 8:53 AM
To: 'rt-users at lists.bestpractical.com'
Subject: [rt-users] RT Logger not logging to file

This is a follow-up to my issue with the modification of the ModifyQuery callback.  Well, I have another callback that works beautifully, as expected: SkipTransaction, and only allows the user to see the initial creation of the ticket and any correspondence (comments are omitted).  (By the way, I just tried putting in the %init portion of Create.html directly a call of $RT::Logger->debug("The current queue is " $Queue); after the rendering of the ticket page before if ticket is clone, and I did NOT receive this in the RT log.  I would appreciate any assistance in debugging the debugger!

Here is the code for that callback with the Logger inserted:
<%init>
    return if $session{'CurrentUser'}->Privileged;
    my($myskip)=1;
    if ($Transaction->Type =~ /^(Correspond|Create)$/) {
        $myskip=0;
    }

$RT::Logger->debug("The value of myskip is ",
                $myskip);

$$skip=$myskip;
</%init>

<%args>
$Transaction => undef
$skip
</%args>
Now, for whatever reason, I am not seeing anything in the logs related to this.  I see all the authentication of the unprivileged user via LDAP, and the rendering of attachments (text/html) for this ticket when viewed, but no "The value of myskip is <0 or 1>"

Kevin pointed out there may be some issues with the install, but I have installed this from source and it has been tested thoroughly, and so far, the only flaw is the logger, and the fact that I can't seem to get the ModifyQuery callback working.

Any ideas why the RT logger is not working within the callbacks and not working for any calls I have added directly in the code?  It works on calls which are already in the code, and my format is the same...I would like to fix this, or find the problem as soon as possible.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111017/2479d4fa/attachment.htm>


More information about the rt-users mailing list