<jupyter_start><jupyter_text>Log Viewer Example This example shows how to create an ESP server log viewer to see the ESP logs in real time. First off we import ESPPY and the Visuals<jupyter_code>import esppy
from esppy.espapi.visuals import Visuals<jupyter_output><empty_output><jupyter_text>Set the server_url to point to your ESP server<jupyter_code>server_url = "http://espsrv01:7777"<jupyter_output><empty_output><jupyter_text>Create the ESPPY instance, the server connection, and the Visuals object.<jupyter_code>esp = esppy.ESP(server_url)
conn = esp.createServerConnection()
visuals = Visuals()
viewer = visuals.createLogViewer(conn,height="600px",filter="",max=25)
viewer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09026798307475317, 'fraction_numerical': 0.015514809590973202, 'mean_word_length': 8.342105263157896, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '384582', 'license': 'Apache-2.0', 'n_tokens_mistral': 248, 'n_tokens_neox': 236, 'n_words': 62, 'path': 'examples/logviewer/logviewer.ipynb', 'repo_name': 'PeterHealy/python-esppy', 'size': '709'}