jhuckaby/Cronicle

getting detailed logs for job event log

BenShaharNS opened this issue · 2 comments

Summary

I'm using python to create plugins to use with cronicle, but for some reason the stdout stream from python isn't getting caught in the event log, I've tried to use print(), logging.info(), logging.debug() and its seems like only streams to the stderr are getting caught, e.g. logging.error() or actual errors from the script.

desired behavior if possible:
getting the stdout of what ever script im running to be included in the job event log

Steps to reproduce the problem

script as example:
`import sys
import json
import logging

stdinput = sys.stdin.readline()
data = json.loads(stdinput)

def test_logs(data):
logging.debug("debug statement")
logging.error("error statement")

if name == 'main':
test_logs(data)`

Your Setup

single node cronicle setup, v0.9.59, running in a docker container

Operating system and version?

MacOS 14.4

Node.js version?

v18.20.4

Cronicle software version?

v0.9.59

Are you using a multi-server setup, or just a single server?

single server

Are you using the filesystem as back-end storage, or S3/Couchbase?

nope

It's a known python quirk, need to do stdout flushing.
#691

@mikeTWC1984 Hi, it indeed solved the problem.

thanks for the help! 💯