How do you get log info from HARS/Where does HARS write logs

   695   1   1
User Avatar
Member
2 posts
Joined: 10月 2019
Offline
Hi,

I'm trying to debug an issue with running a callback on a custom HDA in a HARS session.

The button/callback works fine in a GUI session of Houdini (19.5.684) but doesn't seem to work when being "pressed" with a hapi.setParmIntValue()call.

The hapi.setParmIntValuereturn value is Truewhich suggests that the button has been "pushed"... but that the callback is failing at some point. However because the callback only use python print()to report it's progress I'm trying to work out if there's a way to get that log information out of HARS and over to the DCC that's invoking the HARS session.

I will begin converting the callback logs to write to disk as a workaround... but it would be good to know what the best way of getting this information would be normally (to improve user experience etc, as they're not likely to go looking around at log files on disk to find why things don't work).

Thanks in advance for any help you can provide.

Tom F-W
Pipe Supe - Union VFX
User Avatar
Member
636 posts
Joined: 6月 2006
Offline
I am not the expert for the HAPI.
what i would try is one of this functions

1. Stdout
https://www.geeksforgeeks.org/sys-stdout-write-in-python/ [www.geeksforgeeks.org]

2. Use python logging
https://docs.python.org/3.10/howto/logging.html [docs.python.org]

Sometimes it is tricky to find the problem. You also can try hython but it depends on the implementation.
  • Quick Links