Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have logger create new logfiles if they dont exist #13

Closed
seamustuohy opened this issue Feb 5, 2014 · 1 comment
Closed

Have logger create new logfiles if they dont exist #13

seamustuohy opened this issue Feb 5, 2014 · 1 comment

Comments

@seamustuohy
Copy link
Collaborator

To address this style of error

Traceback (most recent call last):
File "commotion_client.py", line 227, in
main()
File "commotion_client.py", line 73, in main
log = logger.set_logging("commotion_client", logLevel, logFile)
File "/home/me/projects/commotion/commotion-client/commotion_client/utils/logger.py", line 36, in set_logging
fh = logging.FileHandler(logfile)
File "/usr/local/lib/python3.3/logging/init.py", line 967, in init
StreamHandler.init(self, self._open())
File "/usr/local/lib/python3.3/logging/init.py", line 989, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/home/me/projects/commotion/commotion-client/commotion_client/temp/logfile.temp'

commotion-client/commotion_client/utils/logger.py

@seamustuohy
Copy link
Collaborator Author

Take that back. This only occurs when you specify a logfile in a folder that does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant