User input (commands) now base64 encoded in the log file

This commit is contained in:
David J. Bianco
2025-01-10 15:47:16 -05:00
parent 46a958aea8
commit 4967d44df9

View File

@ -181,7 +181,7 @@ async def handle_client(process: asyncssh.SSHServerProcess, server: MySSHServer)
try: try:
async for line in process.stdin: async for line in process.stdin:
line = line.rstrip('\n') line = line.rstrip('\n')
logger.info("User input", extra={"details": line}) logger.info("User input", extra={"details": b64encode(line.encode('utf-8')).decode('utf-8')})
# Send the command to the LLM and give the response to the user # Send the command to the LLM and give the response to the user
llm_response = await with_message_history.ainvoke( llm_response = await with_message_history.ainvoke(