Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-nfdhcpd
Commits
0a2aed6e
Commit
0a2aed6e
authored
Oct 03, 2012
by
Dimitris Aragiorgis
Browse files
Change RotatingFileHAndler to WatchedFileHandler
Signed-off-by:
Dimitris Aragiorgis
<
dimara@grnet.gr
>
parent
de311515
Changes
1
Hide whitespace changes
Inline
Side-by-side
nfdhcpd
View file @
0a2aed6e
...
...
@@ -125,7 +125,7 @@ def get_indev(payload):
try
:
indev_ifindex
=
payload
.
get_physindev
()
if
indev_ifindex
:
logging
.
debug
(
" - Incom
m
ing packet from bridge %s"
,
indev_ifindex
)
logging
.
debug
(
" - Incoming packet from bridge %s"
,
indev_ifindex
)
return
indev_ifindex
except
AttributeError
:
#TODO: return error value
...
...
@@ -133,7 +133,7 @@ def get_indev(payload):
return
0
indev_ifindex
=
payload
.
get_indev
()
logging
.
debug
(
" - Incom
m
ing packet from tap %s"
,
indev_ifindex
)
logging
.
debug
(
" - Incoming packet from tap %s"
,
indev_ifindex
)
return
indev_ifindex
...
...
@@ -548,13 +548,12 @@ class VMNetProxy(object): # pylint: disable=R0902
"""
try
:
for
k
in
self
.
clients
.
keys
():
b
=
self
.
clients
[
k
]
if
self
.
clients
[
k
].
tap
==
tap
:
for
cl
in
self
.
clients
.
values
():
if
cl
.
tap
==
tap
:
logging
.
debug
(
"Removing client on interface %s"
,
tap
)
logging
.
debug
(
" -
%5s:
%10s %20s %7s %15s"
,
k
,
b
.
hostname
,
b
.
mac
,
b
.
tap
,
b
.
ip
)
del
self
.
clients
[
k
]
logging
.
debug
(
" - %10s %20s %7s %15s"
,
cl
.
hostname
,
cl
.
mac
,
cl
.
tap
,
cl
.
ip
)
del
cl
except
:
logging
.
debug
(
"Client on %s disappeared!!!"
,
tap
)
...
...
@@ -747,7 +746,7 @@ class VMNetProxy(object): # pylint: disable=R0902
"""
logging
.
debug
(
" * Processing pending NS request (NFQ
u
EUE %d)"
,
i
)
logging
.
debug
(
" * Processing pending NS request (NFQ
U
EUE %d)"
,
i
)
ns
=
IPv6
(
payload
.
get_data
())
#logging.debug(ns.show())
...
...
@@ -1007,8 +1006,7 @@ if __name__ == "__main__":
if
opts
.
daemonize
:
logfile
=
os
.
path
.
join
(
config
[
"general"
][
"logdir"
],
LOG_FILENAME
)
handler
=
logging
.
handlers
.
RotatingFileHandler
(
logfile
,
maxBytes
=
2097152
)
handler
=
logging
.
handlers
.
WatchedFileHandler
(
logfile
)
else
:
handler
=
logging
.
StreamHandler
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment