Skip to content

Commit 3829238

Browse files
author
Markus
authored
Update README.md
1 parent 79a5440 commit 3829238

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,16 @@ be helpful is for adding user context. For example you might want to do somethin
143143
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.
144144
You might want to do something like this e.g. in your `AbstractActionController::preDispatch()`:
145145

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

154-
155156
#Configuration options
156157

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

0 commit comments

Comments
 (0)