views:

36

answers:

1

I'm using the Freebase Python library. It creates a log before executing:

self.log = logging.getLogger("freebase")

Where is this log in the file system? It's not in the executing directory or tmp.

+3  A: 

That call does not store anything. It merely creates a logger object which can be bound and configured however you would like.

So if in your Python code, you were to add

logging.basicConfig(level=logging.WARNING)

All warnings and errors would be logged to the standard output (that's what basicConfig does), including the calls that Freebase makes. If you want to log to the filesystem or other target, you'll want to reference the logging module documentation for more information.

Jason R. Coombs
+1 to what Jason said. You can also do e.g. `logging.basicConfig(filename='/path/to/file.log', filemode='w', level=logging.DEBUG)` to do simple logging of everything to a file.
Vinay Sajip