Skip to content

Commit b698918

Browse files
author
Markus
authored
Update README.md
1 parent 280e314 commit b698918

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,17 @@ be helpful is for adding user context. For example you might want to do somethin
144144
You can also use Raven directly, if you would like to add some tags to the context, which will be sent with every automatic entry.
145145
You might want to do something like this e.g. in your `AbstractActionController::preDispatch()`:
146146

147-
if ($this->serviceLocator->has('raven')) {
148-
$ravenClient = $this->serviceLocator->get('raven');
149-
$ravenClient->tags_context(array(
150-
'language' => $this->translator()->getLanguage(),
151-
'aclRole' => $acl->getRole()->name,
152-
));
147+
$serviceManager = $mvcEvent->getApplication()->getServiceManager();
148+
if ($serviceManager->has('raven')) {
149+
$ravenClient = $serviceManager->get('raven');
150+
$ravenClient->tags_context(
151+
[
152+
'locale' => $this->translator()->getLocale(),
153+
...
154+
]
155+
);
153156
}
154157

155-
156158
#Configuration options
157159

158160
Just for the record, a copy of the actual global configuration options:

0 commit comments

Comments
 (0)