[Rt-commit] r12539 - in rt/branches/3.8-TESTING: . lib/RT/Action lib/RT/Crypt lib/RT/Interface
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon May 19 17:00:00 EDT 2008
Author: alexmv
Date: Mon May 19 16:59:58 2008
New Revision: 12539
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/ACL_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/Action/CreateTickets.pm
rt/branches/3.8-TESTING/lib/RT/Action/EscalatePriority.pm
rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm
rt/branches/3.8-TESTING/lib/RT/Attachment_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/Crypt/GnuPG.pm
rt/branches/3.8-TESTING/lib/RT/Interface/CLI.pm
rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm
rt/branches/3.8-TESTING/lib/RT/Link_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/Queue_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/Record.pm
rt/branches/3.8-TESTING/lib/RT/Scrips_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
Log:
r31968 at kohr-ah: chmrr | 2008-05-19 16:59:43 -0400
* Remove newlines from logging messages
Modified: rt/branches/3.8-TESTING/lib/RT/ACL_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/ACL_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/ACL_Overlay.pm Mon May 19 16:59:58 2008
@@ -314,7 +314,7 @@
my $self = shift;
# $RT::Logger->debug("Now in ".$self."->_DoSearch");
my $return = $self->SUPER::_DoSearch(@_);
- # $RT::Logger->debug("In $self ->_DoSearch. return from SUPER::_DoSearch was $return\n");
+ # $RT::Logger->debug("In $self ->_DoSearch. return from SUPER::_DoSearch was $return");
$self->_BuildHash();
return ($return);
}
Modified: rt/branches/3.8-TESTING/lib/RT/Action/CreateTickets.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Action/CreateTickets.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Action/CreateTickets.pm Mon May 19 16:59:58 2008
@@ -312,16 +312,16 @@
my $self = shift;
unless ( $self->TemplateObj ) {
- $RT::Logger->warning("No template object handed to $self\n");
+ $RT::Logger->warning("No template object handed to $self");
}
unless ( $self->TransactionObj ) {
- $RT::Logger->warning("No transaction object handed to $self\n");
+ $RT::Logger->warning("No transaction object handed to $self");
}
unless ( $self->TicketObj ) {
- $RT::Logger->warning("No ticket object handed to $self\n");
+ $RT::Logger->warning("No ticket object handed to $self");
}
@@ -665,7 +665,7 @@
}
);
- $RT::Logger->debug("Workflow: yielding\n$content");
+ $RT::Logger->debug("Workflow: yielding $content");
if ($err) {
$RT::Logger->error( "Ticket creation failed: " . $err );
Modified: rt/branches/3.8-TESTING/lib/RT/Action/EscalatePriority.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Action/EscalatePriority.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Action/EscalatePriority.pm Mon May 19 16:59:58 2008
@@ -156,7 +156,7 @@
my ($val, $msg) = $self->TicketObj->SetPriority($self->{'prio'});
unless ($val) {
- $RT::Logger->debug($self . " $msg\n");
+ $RT::Logger->debug($self . " $msg");
}
}
Modified: rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm Mon May 19 16:59:58 2008
@@ -766,7 +766,7 @@
@{ $self->{$_} } = () for (@EMAIL_RECIPIENT_HEADERS);
$RT::Logger->info( $msgid
. " The incoming message was autogenerated. "
- . "Not redistributing this message based on site configuration.\n"
+ . "Not redistributing this message based on site configuration."
);
} elsif ( RT->Config->Get('RedistributeAutoGeneratedMessages') eq
'privileged' )
@@ -782,7 +782,7 @@
}
$RT::Logger->info( $msgid
. " The incoming message was autogenerated. "
- . "Not redistributing this message to unprivileged users based on site configuration.\n"
+ . "Not redistributing this message to unprivileged users based on site configuration."
);
}
}
@@ -1090,7 +1090,7 @@
if ( $max <= 0 ) {
# gives an error...
- $RT::Logger->crit("Can't encode! Charset or encoding too big.\n");
+ $RT::Logger->crit("Can't encode! Charset or encoding too big.");
return ($value);
}
Modified: rt/branches/3.8-TESTING/lib/RT/Attachment_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Attachment_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Attachment_Overlay.pm Mon May 19 16:59:58 2008
@@ -111,7 +111,7 @@
# if we didn't specify a ticket, we need to bail
unless ( $args{'TransactionId'} ) {
- $RT::Logger->crit( "RT::Attachment->Create couldn't, as you didn't specify a transaction\n" );
+ $RT::Logger->crit( "RT::Attachment->Create couldn't, as you didn't specify a transaction" );
return (0);
}
Modified: rt/branches/3.8-TESTING/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Crypt/GnuPG.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Crypt/GnuPG.pm Mon May 19 16:59:58 2008
@@ -2088,8 +2088,7 @@
}
$RT::Logger->debug( $res{'status'} ) if $res{'status'};
$RT::Logger->warning( $res{'error'} ) if $res{'error'};
- $RT::Logger->error( "Tried to get $type key '$email'.\n". $res{'logger'} )
- if $res{'logger'} && $?;
+ $RT::Logger->error( $res{'logger'} ) if $res{'logger'} && $?;
if ( $@ || $? ) {
$res{'message'} = $@? $@: "gpg exitted with error code ". ($? >> 8);
return %res;
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/CLI.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/CLI.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/CLI.pm Mon May 19 16:59:58 2008
@@ -222,7 +222,7 @@
if ($edit) {
unless ($ENV{'EDITOR'}) {
- $RT::Logger->crit('No $EDITOR variable defined'. "\n");
+ $RT::Logger->crit('No $EDITOR variable defined');
return undef;
}
system ($ENV{'EDITOR'}, $filename);
@@ -245,7 +245,7 @@
my $val = shift;
my ($debug);
if ($val) {
- $RT::Logger->debug($val."\n");
+ $RT::Logger->debug($val);
if ($debug) {
print STDERR "$val\n";
}
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm Mon May 19 16:59:58 2008
@@ -328,7 +328,7 @@
|| $args{'Entity'}->head->get('Cc')
|| $args{'Entity'}->head->get('Bcc') )
{
- $RT::Logger->info( $msgid . " No recipients found. Not sending.\n" );
+ $RT::Logger->info( $msgid . " No recipients found. Not sending." );
return -1;
}
Modified: rt/branches/3.8-TESTING/lib/RT/Link_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Link_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Link_Overlay.pm Mon May 19 16:59:58 2008
@@ -98,7 +98,7 @@
unless ( $base->Resolver && $base->Scheme ) {
my $msg = $self->loc("Couldn't resolve base '[_1]' into a URI.",
$args{'Base'});
- $RT::Logger->warning( "$self $msg\n" );
+ $RT::Logger->warning( "$self $msg" );
if (wantarray) {
return(undef, $msg);
@@ -113,7 +113,7 @@
unless ( $target->Resolver ) {
my $msg = $self->loc("Couldn't resolve target '[_1]' into a URI.",
$args{'Target'});
- $RT::Logger->warning( "$self $msg\n" );
+ $RT::Logger->warning( "$self $msg" );
if (wantarray) {
return(undef, $msg);
Modified: rt/branches/3.8-TESTING/lib/RT/Queue_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Queue_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Queue_Overlay.pm Mon May 19 16:59:58 2008
@@ -156,7 +156,7 @@
#check acls
unless ( $self->CurrentUserHasRight('ModifyQueue') ) {
- $RT::Logger->debug("No permission to delete links\n");
+ $RT::Logger->debug("No permission to delete links");
return ( 0, $self->loc('Permission Denied'))
}
@@ -805,7 +805,7 @@
my ($m_id, $m_msg) = $group->_AddMember(PrincipalId => $principal->Id);
unless ($m_id) {
- $RT::Logger->error("Failed to add ".$principal->Id." as a member of group ".$group->Id."\n".$m_msg);
+ $RT::Logger->error("Failed to add ".$principal->Id." as a member of group ".$group->Id.": ".$m_msg);
return ( 0, $self->loc('Could not make that principal a [_1] for this queue', $args{'Type'}) );
}
@@ -912,7 +912,7 @@
my ($m_id, $m_msg) = $group->_DeleteMember($principal->Id);
unless ($m_id) {
$RT::Logger->error("Failed to delete ".$principal->Id.
- " as a member of group ".$group->Id."\n".$m_msg);
+ " as a member of group ".$group->Id.": ".$m_msg);
return ( 0, $self->loc('Could not remove that principal as a [_1] for this queue', $args{'Type'}) );
}
Modified: rt/branches/3.8-TESTING/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Record.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Record.pm Mon May 19 16:59:58 2008
@@ -742,7 +742,7 @@
$ContentEncoding = 'base64';
#cut the max attchment size by 25% (for mime-encoding overhead.
- $RT::Logger->debug("Max size is $MaxSize\n");
+ $RT::Logger->debug("Max size is $MaxSize");
$MaxSize = $MaxSize * 3 / 4;
# Some databases (postgres) can't handle non-utf8 data
} elsif ( !$RT::Handle->BinarySafeBLOBs
@@ -767,9 +767,8 @@
# drop the attachment on the floor
$RT::Logger->info( "$self: Dropped an attachment of size "
- . length($Body) . "\n"
- . "It started: " . substr( $Body, 0, 60 ) . "\n"
- );
+ . length($Body));
+ $RT::Logger->info( "It started: " . substr( $Body, 0, 60 ) );
return ("none", "Large attachment dropped" );
}
}
@@ -1207,7 +1206,7 @@
my $direction;
if ( $args{'Base'} and $args{'Target'} ) {
- $RT::Logger->debug( "$self tried to create a link. both base and target were specified\n" );
+ $RT::Logger->debug( "$self tried to create a link. both base and target were specified" );
return ( 0, $self->loc("Can't specifiy both base and target") );
}
elsif ( $args{'Base'} ) {
@@ -1283,7 +1282,7 @@
my $remote_link;
if ( $args{'Base'} and $args{'Target'} ) {
- $RT::Logger->debug("$self ->_DeleteLink. got both Base and Target\n");
+ $RT::Logger->debug("$self ->_DeleteLink. got both Base and Target");
return ( 0, $self->loc("Can't specifiy both base and target") );
}
elsif ( $args{'Base'} ) {
@@ -1297,12 +1296,12 @@
$direction='Base';
}
else {
- $RT::Logger->error("Base or Target must be specified\n");
+ $RT::Logger->error("Base or Target must be specified");
return ( 0, $self->loc('Either base or target must be specified') );
}
my $link = new RT::Link( $self->CurrentUser );
- $RT::Logger->debug( "Trying to load link: " . $args{'Base'} . " " . $args{'Type'} . " " . $args{'Target'} . "\n" );
+ $RT::Logger->debug( "Trying to load link: " . $args{'Base'} . " " . $args{'Type'} . " " . $args{'Target'} );
$link->LoadByParams( Base=> $args{'Base'}, Type=> $args{'Type'}, Target=> $args{'Target'} );
@@ -1318,7 +1317,7 @@
#if it's not a link we can find
else {
- $RT::Logger->debug("Couldn't find that link\n");
+ $RT::Logger->debug("Couldn't find that link");
return ( 0, $self->loc("Link not found") );
}
}
Modified: rt/branches/3.8-TESTING/lib/RT/Scrips_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Scrips_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Scrips_Overlay.pm Mon May 19 16:59:58 2008
@@ -289,7 +289,7 @@
else {
$self->{'TicketObj'} = RT::Ticket->new( $self->CurrentUser );
$self->{'TicketObj'}->Load( $args{'Ticket'} )
- || $RT::Logger->err("$self couldn't load ticket $args{'Ticket'}\n");
+ || $RT::Logger->err("$self couldn't load ticket $args{'Ticket'}");
}
if ( ( $self->{'TransactionObj'} = $args{'TransactionObj'} ) ) {
@@ -298,7 +298,7 @@
else {
$self->{'TransactionObj'} = RT::Transaction->new( $self->CurrentUser );
$self->{'TransactionObj'}->Load( $args{'Transaction'} )
- || $RT::Logger->err( "$self couldn't load transaction $args{'Transaction'}\n");
+ || $RT::Logger->err( "$self couldn't load transaction $args{'Transaction'}");
}
}
Modified: rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm Mon May 19 16:59:58 2008
@@ -169,7 +169,7 @@
my ($ticketid,$msg) = $self->LoadById($id);
unless ($self->Id) {
- $RT::Logger->crit("$self tried to load a bogus ticket: $id\n");
+ $RT::Logger->crit("$self tried to load a bogus ticket: $id");
return (undef);
}
}
@@ -491,7 +491,7 @@
Value => ( $args{'EffectiveId'} || $id )
);
unless ( $val ) {
- $RT::Logger->crit("Couldn't set EffectiveId: $msg\n");
+ $RT::Logger->crit("Couldn't set EffectiveId: $msg");
$RT::Handle->Rollback;
return ( 0, 0,
$self->loc("Ticket could not be created due to an internal error")
@@ -856,7 +856,7 @@
. ") was proposed "
. "as a ticket owner but has no rights to own "
. "tickets in '"
- . $QueueObj->Name . "'\n" );
+ . $QueueObj->Name . "'" );
$Owner = undef;
}
@@ -915,7 +915,7 @@
unless ($val) {
$RT::Logger->err(
- $self . "->Import couldn't set EffectiveId: $msg\n" );
+ $self . "->Import couldn't set EffectiveId: $msg" );
}
}
@@ -1118,7 +1118,7 @@
my ( $m_id, $m_msg ) = $group->_AddMember( PrincipalId => $principal->Id,
InsideTransaction => 1 );
unless ($m_id) {
- $RT::Logger->error("Failed to add ".$principal->Id." as a member of group ".$group->Id."\n".$m_msg);
+ $RT::Logger->error("Failed to add ".$principal->Id." as a member of group ".$group->Id.": ".$m_msg);
return ( 0, $self->loc('Could not make that principal a [_1] for this ticket', $self->loc($args{'Type'})) );
}
@@ -1241,7 +1241,7 @@
$RT::Logger->error( "Failed to delete "
. $principal->Id
. " as a member of group "
- . $group->Id . "\n"
+ . $group->Id . ": "
. $m_msg );
return (0,
@@ -2210,7 +2210,7 @@
);
unless ( $args{'Target'} || $args{'Base'} ) {
- $RT::Logger->error("Base or Target must be specified\n");
+ $RT::Logger->error("Base or Target must be specified");
return ( 0, $self->loc('Either base or target must be specified') );
}
@@ -2305,7 +2305,7 @@
@_ );
unless ( $args{'Target'} || $args{'Base'} ) {
- $RT::Logger->error("Base or Target must be specified\n");
+ $RT::Logger->error("Base or Target must be specified");
return ( 0, $self->loc('Either base or target must be specified') );
}
@@ -2342,7 +2342,7 @@
unless ( $uri_obj->Resolver && $uri_obj->Scheme ) {
my $msg = $self->loc( "Couldn't resolve '[_1]' into a URI.", $args{'URI'} );
- $RT::Logger->warning( "$msg\n" );
+ $RT::Logger->warning( $msg );
return( 0, $msg );
}
my $obj = $uri_obj->Resolver->Object;
@@ -3242,7 +3242,7 @@
#if the field is public, return it.
if ( $self->_Accessible( $field, 'public' ) ) {
- #$RT::Logger->debug("Skipping ACL check for $field\n");
+ #$RT::Logger->debug("Skipping ACL check for $field");
return ( $self->SUPER::_Value($field) );
}
Modified: rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm Mon May 19 16:59:58 2008
@@ -457,7 +457,7 @@
$address = $self->CanonicalizeEmailAddress($address);
- #$RT::Logger->debug("Trying to load an email address: $address\n");
+ #$RT::Logger->debug("Trying to load an email address: $address");
return $self->LoadByCol( "EmailAddress", $address );
}
More information about the Rt-commit
mailing list