File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -143,15 +143,16 @@ be helpful is for adding user context. For example you might want to do somethin
143143You can also use Raven directly, if you would like to add some tags to the context, which will be sent with every automatic entry.
144144You 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
157158Just for the record, a copy of the actual global configuration options:
You can’t perform that action at this time.
0 commit comments