{"push_id":848708952,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"11bb6b2cb5fb8f01b3b378842536678dfa90cd39","before":"a347ad97e30d10b2f553e84219866bf1d0487130","commits":[{"sha":"11bb6b2cb5fb8f01b3b378842536678dfa90cd39","author":{"email":"280dc10ceb6cfa889421dc86b894c6e9b94bbb8d@gmail.com","name":"Hawkeye Parker"},"message":"Adds \"_enable_logging.py\", which imports Dragonfly's log.py and runs setup_log(), thereby turning logging on for dragonfly.\n\nOtherwise, just some minor changes/additions to various macro scripts.\n\nSome notes about Dragonfly logging:\n\nHow Dragonfly gets \"loaded\"\n\nDragonfly doesn’t “get loaded” by NatLink; NatLink loads any user-defined macro files, and those macro files can, in turn, “load” Dragonfly by explicitly importing dragonfly modules. So, if, e.g., you want Dragonfly logging enabled, some macro file needs to either directly or indirectly import log.py and run log.py’s setup_log() function, which initializes Dragonfly’s logging system.\n\nLogging\n\nFirst off, see \"How Dragonfly gets 'loaded'\", above.\n\nDragonfly’s logging uses Python’s built-in logging system. Dragonfly configures it with a bunch of named loggers, names relevant to Dragonfly, each of which is assigned two different logging levels: stdout and file:\n\n\"engine\": (_warning, _info),\n\nThis means, “the logger named ‘engine’ uses the warning level for stdout logging, and the info level for file logging.” So that, if you did something like this:\n\nengine_log = logging.getLogger(\"engine\")\nengine_log.info(\"The file log should see this, but not stdout.\")\nengine_log.warning(\"Both logs should see this.\")\n\nThese log statements should get logged where they say they’re going to be logged. The long and short is that, if you want to see more logging statements, you can either set the actual named loggers to a lower logging level, or override the named log level assignments; e.g., change\n\n_error     = logging.ERROR\n\nTo\n\n_error     = logging.DEBUG","distinct":true,"url":"https://api.github.com/repos/haughki/MyDragonflyModules/commits/11bb6b2cb5fb8f01b3b378842536678dfa90cd39"}]}