This commit is contained in:
Reid 'arrdem' McKenzie 2021-12-27 00:49:28 -07:00
parent b5bb534664
commit 89cedc120a
3 changed files with 4 additions and 7 deletions

View file

@ -18,11 +18,11 @@ import queue
from queue import Queue from queue import Queue
import sys import sys
from threading import Event, Lock, Thread 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 *
from .icmp import _ping from .icmp import _ping
from .cursedlogger import CursesHandler
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -218,7 +218,7 @@ def main():
logscr = curses.newwin(height, width, begin_y, begin_x) logscr = curses.newwin(height, width, begin_y, begin_x)
handler = CursesHandler(logscr) 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) handler.setFormatter(formatter)
log.addHandler(handler) log.addHandler(handler)
log.setLevel(logging.DEBUG) log.setLevel(logging.DEBUG)

View file

@ -1,10 +1,8 @@
"""A CURSES screen targeted log record handler.""" """A CURSES screen targeted log record handler."""
import logging
import curses
from collections import deque as ringbuffer from collections import deque as ringbuffer
from itertools import count from itertools import count
import logging
class CursesHandler(logging.Handler): class CursesHandler(logging.Handler):

View file

@ -11,7 +11,6 @@ from time import sleep as _sleep
from icmplib.exceptions import ( from icmplib.exceptions import (
ICMPLibError, ICMPLibError,
ICMPSocketError, ICMPSocketError,
TimeoutExceeded,
) )
from icmplib.models import ( from icmplib.models import (
Hop, Hop,