I am new in Enigma dreambox. I am making simple login plugin. I want to see output of print statement so i can trace my plugin. So where can i find this output of print statement Or is there other way to trace program?
Asked
Active
Viewed 434 times
0
-
Do you mean 'trace' your program? – nneonneo Aug 12 '14 at 05:52
2 Answers
0
I don't know how Enigma runs, but unless it's going out of its way to redirect your stdout
somewhere, you probably can't find it anywhere.
What you probably can do is use the logging
module (also see the HOWTO/Tutorial if you've never seen logging
before). You can log to a file that you read later, or even to a syslog
daemon on your laptop somewhere else on the network.
Or just open
a file somewhere and write
to it (making sure to flush
and/or close
it appropriately). But logging
takes care of a whole lot of stuff for you, so it's almost always a better choice.

abarnert
- 354,177
- 51
- 601
- 671
-
Yes, I was also thinking about this. But print is better for read and less time consuming. Thanks for reply. – user3932031 Aug 12 '14 at 06:11
-
@user3932031: How is `print` either better to read or less time consuming? Really, you should only be using print for actually printing to stdout for console programs, and for quick&dirty debugging (and only when it works for quick&dirty debugging); for logging output, use `logging`. – abarnert Aug 12 '14 at 06:46
0
1- Telnet to your STB and enter "enigma2", Your STB will do a Restart GUI then you will be able to see debug messages
2- Run your plugin and check what you need
-
Yes, but before that, it is necessary to stop the enigma2 process, not start it again. This can be done, for example, by changing the linux run-level, through the `init 4` command, or simply by shooting down the enigma2 processes `killall -9 enigma2`, or a combination of both `init 4; sleep 5; killall -9 enigma2`. Only then is it possible to run Enigma2 from the Shell again, and watching the debug-log messages from the error console (on the display). Of course, redirecting the error console to a file is also helpful: `init 4; sleep 5; killall -9 enigma2; enigma2 > /tmp/e2debug.log 2>&1`. – s3n0 Oct 19 '21 at 08:10