Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
croft1
floodlight
Commits
2dcc31e8
Commit
2dcc31e8
authored
13 years ago
by
Mandeep Dhami
Browse files
Options
Downloads
Patches
Plain Diff
Fixed thread names to make logs easier to understand
parent
0ba0e8bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/net/floodlightcontroller/jython/Server.java
+1
-0
1 addition, 0 deletions
src/main/java/net/floodlightcontroller/jython/Server.java
src/main/python/debugserver.py
+6
-3
6 additions, 3 deletions
src/main/python/debugserver.py
with
7 additions
and
3 deletions
src/main/java/net/floodlightcontroller/jython/Server.java
+
1
−
0
View file @
2dcc31e8
...
...
@@ -32,6 +32,7 @@ public class Server extends Thread {
this
.
locals
=
new
HashMap
<
String
,
Object
>();
}
this
.
locals
.
put
(
"log"
,
Server
.
log
);
this
.
setName
(
"debugserver"
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/main/python/debugserver.py
+
6
−
3
View file @
2dcc31e8
#!/usr/bin/env python
import
sys
from
threading
import
currentThread
from
SocketServer
import
BaseRequestHandler
,
TCPServer
from
code
import
InteractiveConsole
...
...
@@ -37,7 +38,8 @@ class DebugConsole(InteractiveConsole):
class
DebugServerHandler
(
BaseRequestHandler
):
def
__init__
(
self
,
request
,
client_address
,
server
):
_log
.
debug
(
'
Open connection to DebugServer from: %s
'
%
str
(
client_address
))
currentThread
().
_thread
.
setName
(
"
debugserver-%s:%d
"
%
client_address
)
_log
.
debug
(
'
Open connection to DebugServer from %s:%d
'
%
client_address
)
BaseRequestHandler
.
__init__
(
self
,
request
,
client_address
,
server
)
def
handle
(
self
):
...
...
@@ -51,13 +53,14 @@ class DebugServer(TCPServer):
allow_reuse_address
=
True
def
handle_error
(
self
,
request
,
client_address
):
_log
.
debug
(
'
Closing connection to DebugServer from
:
%s
'
%
str
(
client_address
)
)
_log
.
debug
(
'
Closing connection to DebugServer from %s
:%d
'
%
client_address
)
request
.
close
()
def
run_server
(
port
=
6655
,
host
=
'
0.0.0.0
'
,
locals
=
locals
()):
currentThread
().
_thread
.
setName
(
"
debugserver-main
"
)
global
_locals
_locals
=
locals
if
"
log
"
in
locals
.
keys
():
global
_log
_log
=
locals
[
"
log
"
]
...
...
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