Last active
March 19, 2020 16:20
-
-
Save bellerbrock/68c3e5bd2ddd13324780b12ff8882f11 to your computer and use it in GitHub Desktop.
Enable logging in RTT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to beginning of cgi: | |
import logging | |
import pprint | |
import config | |
pp = pprint.PrettyPrinter(indent=4) | |
logging.basicConfig(filename=config.ROOT_PATH+"/rtt.log", level=logging.DEBUG) | |
# Add debugging print statements like this | |
logging.debug("reordering following sequence at depth " + str(depth)) | |
logging.debug(pp.pformat(sequence)) | |
# Run these commands to initialize logfile: | |
touch rtt.log | |
chmod 777 rtt.log | |
# Then to see and follow the log while you test: | |
tail -f -n 100 rtt.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment