Via the Python logging module.
This is a code snippet I use to set a log file (if your process is in Python) :
log = logging.getLogger("checkmail")
log.setLevel(logging.DEBUG)
fh = logging.FileHandler("../logs/checkmail.log")
fh.setLevel(logging.DEBUG)
# create formatter and add it to the handlers
formatter = logging.Formatter("%(asctime)s - %(name)s -
%(levelname)s - %(message)s")
fh.setFormatter(formatter)
# add the handlers to logger
log.addHandler(fh)
Your controller will do :
return dict(data=open("/application/myapp/logs/checkmail.log").readlines())
If your process is not a Python program, you can redirect output to a
file via a shell redirection (>) or with the subprocess module.
2011/1/20 mart <[email protected]>:
> Hi,
>
> Does anyone have a quick ad dirty trick to display process output to a
> web age (a panel or something)?
>
> Thanks,
> Mart :)
>