Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sjrpc
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
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
Mirror
sjrpc
Commits
0e3399c2
Commit
0e3399c2
authored
14 years ago
by
Antoine Millet
Browse files
Options
Downloads
Patches
Plain Diff
Logging of sjrpc now use only "debug" verbosity.
parent
322e1128
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sjrpc/client/simple.py
+3
-3
3 additions, 3 deletions
sjrpc/client/simple.py
sjrpc/core/rpcconnection.py
+4
-4
4 additions, 4 deletions
sjrpc/core/rpcconnection.py
sjrpc/server/simple.py
+6
-6
6 additions, 6 deletions
sjrpc/server/simple.py
with
13 additions
and
13 deletions
sjrpc/client/simple.py
+
3
−
3
View file @
0e3399c2
...
...
@@ -82,7 +82,7 @@ class SimpleRpcClient(ConnectionManager):
try
:
self
.
_connection
.
receive
()
except
socket
.
error
as
err
:
logging
.
error
(
'
Socket error while receiving from the client
'
logging
.
debug
(
'
Socket error while receiving from the client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown
()
...
...
@@ -91,12 +91,12 @@ class SimpleRpcClient(ConnectionManager):
try
:
self
.
_connection
.
send
()
except
socket
.
error
as
err
:
logging
.
error
(
'
Socket error while sending to the client
'
logging
.
debug
(
'
Socket error while sending to the client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown
()
if
event
&
select
.
EPOLLHUP
:
logging
.
error
(
'
Socket HUP fd/%s
'
,
fd
)
logging
.
debug
(
'
Socket HUP fd/%s
'
,
fd
)
self
.
shutdown
()
def
all_connections
(
self
):
...
...
This diff is collapsed.
Click to expand it.
sjrpc/core/rpcconnection.py
+
4
−
4
View file @
0e3399c2
...
...
@@ -119,7 +119,7 @@ class RpcConnection(object):
except
socket
.
error
as
err
:
if
err
.
errno
==
11
:
# Errno 11 -> retry again
logging
.
warnin
g
(
'
Non critical error while reading a socket:
'
logging
.
debu
g
(
'
Non critical error while reading a socket:
'
'
%r
'
,
err
)
return
...
...
@@ -368,7 +368,7 @@ class RpcConnection(object):
# manager while cleanup.
else
:
logging
.
warnin
g
(
'
Malformed message received: %s
'
,
message
)
logging
.
debu
g
(
'
Malformed message received: %s
'
,
message
)
def
shutdown
(
self
,
callback
=
None
):
'''
...
...
@@ -384,7 +384,7 @@ class RpcConnection(object):
try
:
self
.
_sock
.
close
()
except
socket
.
error
as
err
:
logging
.
warnin
g
(
'
Error while socket close: %s.
'
,
err
)
logging
.
debu
g
(
'
Error while socket close: %s.
'
,
err
)
# Release all running calls from this connection:
for
call
in
self
.
_calls
.
values
():
...
...
@@ -407,7 +407,7 @@ class RpcConnection(object):
try
:
callback
(
self
)
except
Exception
as
err
:
logging
.
error
(
'
Error while execution of shutdown
'
logging
.
debug
(
'
Error while execution of shutdown
'
'
callback: %s
'
,
err
)
def
clean_call
(
self
,
msg_id
):
...
...
This diff is collapsed.
Click to expand it.
sjrpc/server/simple.py
+
6
−
6
View file @
0e3399c2
...
...
@@ -78,11 +78,11 @@ class SimpleRpcServer(ConnectionManager):
try
:
connection
.
receive
()
except
socket
.
error
as
err
:
logging
.
error
(
'
Socket error while receiving from client
'
logging
.
debug
(
'
Socket error while receiving from client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown_client
(
fd
)
except
Exception
as
err
:
logging
.
error
(
'
Unknown error while receiving from client
'
logging
.
debug
(
'
Unknown error while receiving from client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown_client
(
fd
)
...
...
@@ -91,16 +91,16 @@ class SimpleRpcServer(ConnectionManager):
try
:
connection
.
send
()
except
socket
.
error
as
err
:
logging
.
error
(
'
Socket error while sending to the client
'
logging
.
debug
(
'
Socket error while sending to the client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown_client
(
fd
)
except
Exception
as
err
:
logging
.
error
(
'
Unknown error while sending to the client
'
logging
.
debug
(
'
Unknown error while sending to the client
'
'
fd/%s: %s
'
,
fd
,
err
)
self
.
shutdown_client
(
fd
)
if
event
&
select
.
EPOLLHUP
:
logging
.
error
(
'
Socket HUP fd/%s
'
,
fd
)
logging
.
debug
(
'
Socket HUP fd/%s
'
,
fd
)
self
.
shutdown_client
(
fd
)
...
...
@@ -129,6 +129,6 @@ class SimpleSslRpcServer(SimpleRpcServer):
ssl_version
=
ssl
.
PROTOCOL_TLSv1
,
do_handshake_on_connect
=
True
)
except
ssl
.
SSLError
as
err
:
logging
.
error
(
'
Error when accepting ssl connection: %s
'
,
err
)
logging
.
debug
(
'
Error when accepting ssl connection: %s
'
,
err
)
else
:
return
sslsock
,
address
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