filename should be an argument in setlog, not a keyword.  Without a file...

...name, or a filename of None, what is the method going to be writing to?  Either come up with a real default filename, or require a filename be suplied.