sourcebots / robot-api

(Legacy) API to interface with robotd
http://docs.sourcebots.co.uk/api/
MIT License
4 stars 1 forks source link

Actually configure logging #77

Closed PeterJCLaw closed 6 years ago

PeterJCLaw commented 6 years ago

I jumped the gun a bit in #73 and didn't actually include any logging configuration before merging... oops.

RealOrangeOne commented 6 years ago

Functionality which may be useful would be to enable teams to switch the robot into DEBUG logging mode, to get some additional information? Perhaps by passing verbose_logging=True in constructor? (Perhaps warrants more discussion?)

PeterJCLaw commented 6 years ago

Maybe, though this comes back to the usual discussion of how much we wrap things in cotton wool for competitors vs just doing things well in a manner which an knowledgeable Python user would expect.

In the latter case, the competitors can very easily achieve DEBUG level logging as follows:

import logging
from robot import Robot

logging.basicConfig(level=logging.DEBUG)

r = Robot()
...
RealOrangeOne commented 6 years ago

Hmm, ok, perhaps we should log the fact we're using logging, and that people can get more verbose logs by doing that, but that's outside this PR

PeterJCLaw commented 6 years ago

@RealOrangeOne I've side-stepped the logging level issue in 6b4458f2ce10b4e0c80958038ece5a462abaddc9, (which I accidentally pushed to the wrong branch; I'd intended to add it to this PR; oh well).