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

FEATURE: Introduce an utility to add log environment from method name #1399

Merged
merged 3 commits into from Oct 11, 2018

Conversation

Projects
None yet
2 participants
@daniellienert
Copy link
Member

daniellienert commented Oct 3, 2018

This utility can be used to easily add the logging environment to log
messages using the PSR compatible logger.

Example:

$logger->debug('Running sub process loop.', LogEnvironment::fromMethodName(__METHOD__));

@daniellienert daniellienert requested a review from kitsunet Oct 3, 2018

FEATURE: Introduce an utility to add log environment from method name
This utility can be used to easily add the log environment to log
message using the PSR compatible logger.

Example:

```
$logger->debug('Running sub process loop.', LogEnvironment::fromMethodName(__METHOD__));
```

@daniellienert daniellienert force-pushed the daniellienert:feature/log-environment-utility branch from 68934c0 to e09f4bf Oct 3, 2018

@kitsunet
Copy link
Member

kitsunet left a comment

Thanks! Very nice.

@kitsunet

This comment has been minimized.

Copy link
Member

kitsunet commented Oct 10, 2018

I think compiled static methods must be public for reasons. I assume that's what broke the build.

@daniellienert daniellienert force-pushed the daniellienert:feature/log-environment-utility branch 2 times, most recently from ee78100 to bc33f34 Oct 10, 2018

@daniellienert daniellienert force-pushed the daniellienert:feature/log-environment-utility branch from bc33f34 to dad6970 Oct 11, 2018

@daniellienert

This comment has been minimized.

Copy link
Member

daniellienert commented Oct 11, 2018

@kitsunet, thanks. In this case the problem actually was, that I accidentally submitted a changed logger call. In test cases Bootstrap::$staticObjectManager is not available and thus the tests failed. I now explicitly test for availability.

IMHO this one is good to be merged so that we can use the method in Log messages of the core packages.

@kitsunet kitsunet merged commit d4e9cca into neos:master Oct 11, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kitsunet kitsunet deleted the daniellienert:feature/log-environment-utility branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment