Logging

Hi.

I have the following lines in my RT_SiteConfig.pm

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail loops will generate a critical log message.

Set($LogToSyslog , ‘alert’);
Set($LogToScreen , undef);
Set($LogToFile , ‘alert’);
Set($LogDir, ‘/usr/local/rt3/var/log’);
Set($LogToFileNamed , “rt3.log”); #log to rt.log

@LogToSyslogConf = ( socket => ‘inet’ );
_____________________________

In other words I want to log to the rt3.log file with ‘alert’ message level.

I don’t get any output in that file, though, no matter what operations I
carry out in RT.
Is there something that I need to change in Log::Dispatch?

Any hints on getting logging to rt3.log working?

Thanks.
Kind regards.

Luke

Luke,

This may seem like an obvious answer, but it was what did it for me: Check permissions on the $LogDir directory to make sure the web server has write permission and make sure you stop and start the web server.

BenRFrom: rt-users-bounces@lists.bestpractical.com on behalf of Luke Vanderfluit
Sent: Tue 28/03/2006 2:46 PM
To: RT users
Subject: [rt-users] logging

Hi.

I have the following lines in my RT_SiteConfig.pm

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail loops will generate a critical log message.

Set($LogToSyslog , ‘alert’);
Set($LogToScreen , undef);
Set($LogToFile , ‘alert’);
Set($LogDir, ‘/usr/local/rt3/var/log’);
Set($LogToFileNamed , “rt3.log”); #log to rt.log

@LogToSyslogConf = ( socket => ‘inet’ );
_____________________________

In other words I want to log to the rt3.log file with ‘alert’ message level.

I don’t get any output in that file, though, no matter what operations I
carry out in RT.
Is there something that I need to change in Log::Dispatch?

Any hints on getting logging to rt3.log working?

Thanks.
Kind regards.

Luke

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

We’re hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html

This email (including all attachments) is intended solely for the named addressee. It is confidential and may contain legally privileged information. If you receive it in error, please let us know by reply email, do not disclose any information contained in it, delete it from your system and destroy any copies. This email is also subject to copyright. No part of it should be reproduced, adapted or transmitted without the written consent of the copyright owner. Emails may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems.

We give no warranties in relation to these matters. If you have any doubts about the authenticity of an email purportedly sent by us, please contact us immediately. Privacy - Please be aware that information provided in response to this email may contain personal information, which Classic Blue may collect, and use for the purposes of marketing information technology products and services to you. For further information regarding Classic Blue’s privacy policies please refer to www.classicblue.com.au

I don’t get any output in that file, though, no matter what operations I
carry out in RT.

Check the permissions on the directory (if the file doesn’t exist
already) or the file (if it does exist already). The file needs to be
writable by the process that the webserver runs as.

  • Alex

Alex Vandiver wrote:>On Tue, 2006-03-28 at 14:16 +0930, Luke Vanderfluit wrote:

I don’t get any output in that file, though, no matter what operations I
carry out in RT.

Check the permissions on the directory (if the file doesn’t exist
already) or the file (if it does exist already). The file needs to be
writable by the process that the webserver runs as.

  • Alex

OK, I’ve got both the log directory and the file itself set to 777
permissions.
There is still nothing getting logged,
I have log level ‘alert’, shouldn’t that be logging nearly everything to
the file?

Kind regards.

Luke

I have log level ‘alert’, shouldn’t that be logging nearly everything
to the file?

Nope. From RT_Config.pm:
# From lowest to highest priority, the levels are:
# debug info notice warning error critical alert emergency

Try ‘debug’.

  • Alex

Hi.

Joby Walker wrote:

No, alert is the 2nd most restrictive setting, and I don’t know if
anything is logged at that level. The highest I remember seeing is
critical. Try “debug” and you will definitely see something.

Ok, thanks for that. I’m surprised that ‘alert’ which is right up near
‘emergency’ doesn’t show me entries, but ‘debug’ certainly does -:
Anyway, got that working now.
Thanks.

Luke.

jbw

Luke Vanderfluit wrote:

OK, I’ve got both the log directory and the file itself set to 777
permissions.
There is still nothing getting logged,
I have log level ‘alert’, shouldn’t that be logging nearly everything
to the file?

Kind regards.


Luke



The rt-users Archives

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

We’re hiring! Come hack Perl for Best Practical:
Careers — Best Practical Solutions

Luke

Hi.

Alex Vandiver wrote:

I have log level ‘alert’, shouldn’t that be logging nearly everything
to the file?

Nope. From RT_Config.pm:

From lowest to highest priority, the levels are:

debug info notice warning error critical alert emergency

You mean from Highest to lowest, right?

highest ------------------------------------ lowest?

debug info notice warning error critical alert emergency

Kr.
Luke.

Try ‘debug’.

  • Alex

Luke

No, alert is the 2nd most restrictive setting, and I don’t know if
anything is logged at that level. The highest I remember seeing is
critical. Try “debug” and you will definitely see something.

jbw

Luke Vanderfluit wrote:

Alex Vandiver wrote:>On Tue, 2006-03-28 at 14:57 +0930, Luke Vanderfluit wrote:

You mean from Highest to lowest, right?

highest ------------------------------------ lowest?
debug info notice warning error critical alert emergency

No, I mean from lowest to highest. Something that is ‘low priority’ is
not terribly important. This includes things like debugging statements
and generic informational announcements. Things that are ‘high
priority’ are urgent and should demand instant attention. These include
errors, alerts of life-threatening things, and emergencies.

  • Alex

Right, I think I’ve got it now (~8
Thanks.

Luke

Emergency only logs critical errors. Debug logs EVERYTHING.

Luke Vanderfluit wrote:

Hi.

Joby Walker wrote:

No, alert is the 2nd most restrictive setting, and I don’t know if
anything is logged at that level. The highest I remember seeing is
critical. Try “debug” and you will definitely see something.

Ok, thanks for that. I’m surprised that ‘alert’ which is right up near
‘emergency’ doesn’t show me entries, but ‘debug’ certainly does -:
Anyway, got that working now.
Thanks.

Luke.

jbw

Luke Vanderfluit wrote:

OK, I’ve got both the log directory and the file itself set to 777
permissions.
There is still nothing getting logged,
I have log level ‘alert’, shouldn’t that be logging nearly
everything to the file?

Kind regards.


Luke



The rt-users Archives

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

We’re hiring! Come hack Perl for Best Practical:
Careers — Best Practical Solutions

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati