Improve logging
This commit is contained in:
parent
c93078ed6b
commit
984128f193
14
main.py
14
main.py
|
@ -181,6 +181,7 @@ def print_nametag(name, guest=False):
|
||||||
if guest:
|
if guest:
|
||||||
quote_size = 120
|
quote_size = 120
|
||||||
quote = 'GUEST'
|
quote = 'GUEST'
|
||||||
|
logging.info('Printing GUEST nametag for: %s', name)
|
||||||
else:
|
else:
|
||||||
quote_size = 80
|
quote_size = 80
|
||||||
name_lookup = name.lower()[:4]
|
name_lookup = name.lower()[:4]
|
||||||
|
@ -190,6 +191,7 @@ def print_nametag(name, guest=False):
|
||||||
quote = QUOTES[quote_count % len(QUOTES)]
|
quote = QUOTES[quote_count % len(QUOTES)]
|
||||||
quote_count += 1
|
quote_count += 1
|
||||||
assigned_quotes[name_lookup] = quote
|
assigned_quotes[name_lookup] = quote
|
||||||
|
logging.info('Printing MEMBER nametag for: %s, quote: %s', name, quote)
|
||||||
|
|
||||||
name_size = 305
|
name_size = 305
|
||||||
|
|
||||||
|
@ -773,7 +775,7 @@ while True:
|
||||||
messages = ['']*15
|
messages = ['']*15
|
||||||
elif button == 't' and wa_api_key:
|
elif button == 't' and wa_api_key:
|
||||||
current_screen = 'think'
|
current_screen = 'think'
|
||||||
elif button == 'd':
|
elif c == 68:
|
||||||
current_screen = 'debug'
|
current_screen = 'debug'
|
||||||
elif button == 'a':
|
elif button == 'a':
|
||||||
current_screen = 'about'
|
current_screen = 'about'
|
||||||
|
@ -785,7 +787,15 @@ while True:
|
||||||
elif current_screen == 'debug':
|
elif current_screen == 'debug':
|
||||||
if button == 'b' or c == KEY_ESCAPE:
|
if button == 'b' or c == KEY_ESCAPE:
|
||||||
current_screen = 'home'
|
current_screen = 'home'
|
||||||
if button == 'x':
|
if c == 88:
|
||||||
|
break
|
||||||
|
if c == 83:
|
||||||
|
curses.nocbreak()
|
||||||
|
stdscr.keypad(False)
|
||||||
|
curses.echo()
|
||||||
|
curses.endwin()
|
||||||
|
logging.info('Spawning shell.')
|
||||||
|
os.system('/bin/bash')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
try_highlight()
|
try_highlight()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user