Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
2d510fb4
Commit
2d510fb4
authored
5 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-772
: log stack trace on service handler exception. log rpc_args and rpc_kwargs
parent
351370fc
No related branches found
No related tags found
1 merge request
!8
Cobalt2 multithreading fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/Messaging/python/messaging/rpc.py
+6
-2
6 additions, 2 deletions
LCS/Messaging/python/messaging/rpc.py
with
6 additions
and
2 deletions
LCS/Messaging/python/messaging/rpc.py
+
6
−
2
View file @
2d510fb4
...
@@ -236,12 +236,16 @@ class ServiceMessageHandler(UsingToBusMixin, AbstractMessageHandler):
...
@@ -236,12 +236,16 @@ class ServiceMessageHandler(UsingToBusMixin, AbstractMessageHandler):
rpc_args
=
request_msg
.
content
.
get
(
'
args
'
,
[])
rpc_args
=
request_msg
.
content
.
get
(
'
args
'
,
[])
rpc_kwargs
=
request_msg
.
content
.
get
(
'
kwargs
'
,
{})
rpc_kwargs
=
request_msg
.
content
.
get
(
'
kwargs
'
,
{})
logger
.
info
(
"
%s.%s calling service method %s
"
,
self
.
service_name
or
"
<unknown-service>
"
,
logger
.
info
(
"
%s.%s calling service method %s
(%s%s%s)
"
,
self
.
service_name
or
"
<unknown-service>
"
,
self
.
__class__
.
__name__
,
self
.
__class__
.
__name__
,
service_handler_method
.
__name__
)
service_handler_method
.
__name__
,
'
,
'
.
join
(
str
(
arg
)
for
arg
in
rpc_args
),
'
,
'
if
len
(
rpc_args
)
else
''
,
'
,
'
.
join
(
"
%s=%s
"
%
(
k
,
v
)
for
k
,
v
in
rpc_kwargs
.
items
()))
return
service_handler_method
(
*
rpc_args
,
**
rpc_kwargs
)
return
service_handler_method
(
*
rpc_args
,
**
rpc_kwargs
)
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
exception
(
str
(
e
))
raise
Exception
(
"
%s: Error while handling msg with subject %s in service %s in method %s: %s
"
%
(
raise
Exception
(
"
%s: Error while handling msg with subject %s in service %s in method %s: %s
"
%
(
self
.
__class__
.
__name__
,
self
.
__class__
.
__name__
,
request_msg
.
subject
,
request_msg
.
subject
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment