Changeset 180 for trunk/lib/App.inc.php


Ignore:
Timestamp:
Jun 23, 2006 10:00:21 PM (18 years ago)
Author:
scdev
Message:

Q - set limit to the length of logged messages. Added timeElapsed to Utilities.inc.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r177 r180  
    530530            'type'      => $this->logPriorityToString($priority),
    531531            'file:line' => "$file : $line",
    532             'url'       => (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''),
     532            'url'       => substr(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '', 0, 128),
    533533            'message'   => $message
    534534        );
     
    537537        if ($this->getParam('log_file_priority') && $priority <= $this->getParam('log_file_priority')) {
    538538            $event_str = '[' . join('] [', $event) . ']';
    539             error_log($event_str . "\n", 3, $this->getParam('log_directory') . '/' . $this->getParam('log_filename'));
     539            error_log(substr($event_str, 0, 1024) . "\n", 3, $this->getParam('log_directory') . '/' . $this->getParam('log_filename'));
    540540        }
    541541
     
    554554        if ($this->getParam('log_sms_priority') && $priority <= $this->getParam('log_sms_priority')) {
    555555            $subject = sprintf('[%s %s]', getenv('HTTP_HOST'), $priority);
    556             $sms_msg = sprintf('%s [%s:%s]', $event['message'], basename($file), $line);
     556            $sms_msg = sprintf('%s [%s:%s]', substr($event['message'], 0, 64), basename($file), $line);
    557557            $headers = "From: codebase@strangecode.com";
    558558            mail($this->getParam('log_to_sms_address'), $subject, $sms_msg, $headers, '-f codebase@strangecode.com');
Note: See TracChangeset for help on using the changeset viewer.