Show
Ignore:
Timestamp:
02/20/08 20:46:49 (22 months ago)
Author:
bchoate
Message:

Added 'PerformanceLoggingPath' setting to allow configuration of path for performance logs. BugId:68319

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mt4.11/lib/MT/Core.pm

    r1377 r1380  
    499499            'PerformanceLogging' => { default => 0 }, 
    500500            'PerformanceLoggingThreshold' => { default => 0.1 }, 
     501            'PerformanceLoggingPath' => { handler => \&PerformanceLoggingPath }, 
    501502            'ProcessMemoryCommand' => { handler => \&ProcessMemoryCommand }, 
    502503        }, 
     
    797798    require MT::WeblogPublisher; 
    798799    return MT::WeblogPublisher->core_archive_types; 
     800} 
     801 
     802sub PerformanceLoggingPath { 
     803    my $cfg = shift; 
     804    $cfg->set_internal( 'PerformanceLoggingPath', @_ ) if @_; 
     805    my $path = $cfg->get_internal('PerformanceLoggingPath'); 
     806    unless (defined $path) { 
     807        require File::Spec; 
     808        $path = File::Spec->catdir( MT->instance->static_file_path, 
     809            'support', 'logs'); 
     810        $cfg->set_internal('PerformanceLoggingPath', $path); 
     811    } 
     812    return $path; 
    799813} 
    800814