Fmt.
This commit is contained in:
parent
12d6c53985
commit
35a97815cd
3 changed files with 4 additions and 7 deletions
|
@ -18,11 +18,11 @@ import queue
|
|||
from queue import Queue
|
||||
import sys
|
||||
from threading import Event, Lock, Thread
|
||||
from time import sleep as _sleep, time
|
||||
from time import time
|
||||
|
||||
from .cursedlogger import CursesHandler
|
||||
from .icmp import *
|
||||
from .icmp import _ping
|
||||
from .cursedlogger import CursesHandler
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -218,7 +218,7 @@ def main():
|
|||
logscr = curses.newwin(height, width, begin_y, begin_x)
|
||||
|
||||
handler = CursesHandler(logscr)
|
||||
formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
||||
formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
|
||||
handler.setFormatter(formatter)
|
||||
log.addHandler(handler)
|
||||
log.setLevel(logging.DEBUG)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
"""A CURSES screen targeted log record handler."""
|
||||
|
||||
import logging
|
||||
import curses
|
||||
|
||||
from collections import deque as ringbuffer
|
||||
from itertools import count
|
||||
import logging
|
||||
|
||||
|
||||
class CursesHandler(logging.Handler):
|
||||
|
|
|
@ -11,7 +11,6 @@ from time import sleep as _sleep
|
|||
from icmplib.exceptions import (
|
||||
ICMPLibError,
|
||||
ICMPSocketError,
|
||||
TimeoutExceeded,
|
||||
)
|
||||
from icmplib.models import (
|
||||
Hop,
|
||||
|
|
Loading…
Reference in a new issue