Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display microseconds is not possible #57

Closed
oweitman opened this issue Feb 19, 2012 · 4 comments
Closed

Display microseconds is not possible #57

oweitman opened this issue Feb 19, 2012 · 4 comments

Comments

@oweitman
Copy link

LineFormatter configured with the "Y-m-d H:i:s:u" - format-parameter shows microseconds as 0 cause the php-constructorof the DateTime-object dont save the microseconds.
maybe we can adjust in the Logger-class, addRecord-function as follows (see the 'datetime' part):

    $record = array(
        'message' => (string) $message,
        'context' => $context,
        'level' => $level,
        'level_name' => self::getLevelName($level),
        'channel' => $this->name,
        'datetime' => date_create_from_format('U.u', microtime(true)),
        'extra' => array(),
    );  

reference: http://www.php.net/manual/en/datetime.createfromformat.php#107438

@Seldaek
Copy link
Owner

Seldaek commented Feb 20, 2012

Could you send a pull request for this?

@oweitman
Copy link
Author

sorry, i dont know exactly what to do.
i tried it with another github package some time ago, but i failed.

@Seldaek
Copy link
Owner

Seldaek commented Feb 23, 2012

This is now available in the master branch. I'll try to do a release soonish once the two other new handlers could be finished/merged.

@Seldaek Seldaek closed this as completed Feb 23, 2012
@oweitman
Copy link
Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants