Development

Changeset 5249

You must first sign up to be able to contribute.

Changeset 5249

Show
Ignore:
Timestamp:
09/24/07 09:45:31 (2 years ago)
Author:
fabien
Message:

changed sfConsoleLogger to add a carriage return like other loggers (WIP for the CLI)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/log/sfConsoleLogger.class.php

    r5109 r5249  
    2727  protected function doLog($message, $priority) 
    2828  { 
    29     echo $message
     29    echo $message.(DIRECTORY_SEPARATOR == '\\' ? "\r\n" : "\n")
    3030  } 
    3131} 
  • trunk/test/unit/log/sfAggregateLoggerTest.php

    r4957 r5249  
    3939$lines = explode("\n", file_get_contents($file)); 
    4040$t->like($lines[0], '/foo/', '->log() logs a message to all loggers'); 
    41 $t->is($content, 'foo', '->log() logs a message to all loggers'); 
     41$t->is($content, "foo\n", '->log() logs a message to all loggers'); 
    4242 
    4343// ->getLoggers() ->addLoggers() ->addLogger() 
  • trunk/test/unit/log/sfConsoleLoggerTest.php

    r4957 r5249  
    1616ob_start(); 
    1717$logger->log('foo'); 
    18 $t->is(ob_get_clean(), 'foo', 'sfConsoleLogger logs messages to the console'); 
     18$t->is(ob_get_clean(), "foo\n", 'sfConsoleLogger logs messages to the console'); 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.