Ignore:
Timestamp:
Feb 18, 2019 1:24:26 AM (5 years ago)
Author:
anonymous
Message:

Add CLI coloring method. Allow longer email logging in dev.

File:
1 edited

Legend:

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

    r630 r668  
    423423
    424424        case self::SANDBOX_MODE_LOG:
     425            // Temporarily modify log settings to allow full multi-line emails to appear in logs.
    425426            $log_serialize = $app->getParam('log_serialize');
    426             $app->setParam(array('log_serialize' => false));
    427             $app->logMsg(sprintf("\nSubject: %s\nTo: %s\n%s\n\n%s", $this->getParam('subject'), $final_to, str_replace($this->getParam('crlf'), "\n", $final_headers), $final_body), LOG_DEBUG, __FILE__, __LINE__);
    428             $app->setParam(array('log_serialize' => $log_serialize));
     427            $log_message_max_length = $app->getParam('log_message_max_length');
     428            $app->setParam(array('log_serialize' => false, 'log_message_max_length' => 65536));
     429            $app->logMsg(sprintf("\nSubject: %s\nTo: %s\n%s\n\n%s", $this->getParam('subject'), $final_to, trim(str_replace($this->getParam('crlf'), "\n", $final_headers)), trim($final_body)), LOG_DEBUG, __FILE__, __LINE__);
     430            $app->setParam(array('log_serialize' => $log_serialize, 'log_message_max_length' => $log_message_max_length));
    429431            return true;
    430432        }
Note: See TracChangeset for help on using the changeset viewer.