Skip to content
This repository was archived by the owner on Dec 5, 2017. It is now read-only.
This repository was archived by the owner on Dec 5, 2017. It is now read-only.

MonologAdaptor::log() is .. less than optimal #13

Description

@mweibel

log implementation:
https://github.com/liip/DataAggregator/blob/master/src/Liip/DataAggregator/Adaptor/Logger/MonologAdaptor.php#L155

info implementation:
https://github.com/liip/DataAggregator/blob/master/src/Liip/DataAggregator/Adaptor/Logger/MonologAdaptor.php#L125

So, if you call ->log('critical', 'some critical message', ['some' => 'context'); this will make a call to ->info('critical', 'some critical message');. Therefore the message being logged is critical and the context is a string instead of an array.

In case I don't oversee something, this is bug, if not dangerous if anybody is using that.
If monolog doesn't support log then the Adaptor should rather make a switch on the level and call the appropriate method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions