Skip to content

Logger\Formatter\Line::setDateFormat does not support microseconds #2893

Closed
@swen100

Description

@swen100

when i use

$logFormater = new \Phalcon\Logger\Formatter\Line;
$logFormater->setFormat('[%date%][%type%] %message%');
$logFormater->setDateFormat('H:i:s.u');

i only get 000000 for the microseconds (look at the ".u" in the setDateFormat)
i get something like this: [13:51:10.000000]

PHP-Documentation at http://de2.php.net/manual/en/function.date.php says: Note that date() will always generate 000000 since it takes an integer parameter, whereas DateTime::format() does support microseconds.

Aha, is the phalcon-method setDateFormat() only a wrapper to the native Date()-function?

I want to get the microseconds in the log at the "correct" place, what can do?

Swen

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to the framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions