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

Already on GitHub? Sign in to your account

Add log directory creation to startup #2

Merged
merged 5 commits into from Sep 29, 2012

Conversation

Projects
None yet
2 participants
Contributor

jbillo commented Sep 29, 2012

When the repository has just been cloned, there is no 'logs' directory present, causing the application to fail:

Traceback (most recent call last):
  File "musik.py", line 37, in <module>
    log = initLogging(__name__)
  File "/home/jbillo/git/musik/musik/__init__.py", line 12, in initLogging
    fs = logging.FileHandler(u'logs/%s.log' % moduleName)
  File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: u'/home/jbillo/git/musik/logs/__main__.log'

This pull request will attempt to create the directory on startup if it does not exist.

@jbillo jbillo closed this Sep 29, 2012

@jbillo jbillo reopened this Sep 29, 2012

Contributor

jbillo commented Sep 29, 2012

Well, turns out there's quite a few commits in this pull request - it's not just log directory creation anymore. I guess my commits to my own master branch just automatically get appended to this entry. I suppose next time I'll switch branches before making a whole bunch of changes, and then that way the pull request will only have one or two small changes. I'll probably keep adding content to here so you can merge in as necessary, or close this out.

MusikPolice added a commit that referenced this pull request Sep 29, 2012

Merge pull request #2 from jbillo/master
* Add log directory creation to startup
* Created static path for cherrypy and added temporary gedit files to gitignore
* Fixed .gitignore for temporary files
* Threading cleanup (when you modify a file, the app doesn't hang anymore.) CSS edit to confirm that changes are being applied in browser. Exception thrown for non-existent paths.

@MusikPolice MusikPolice merged commit 3d4d145 into MusikPolice:master Sep 29, 2012

MusikPolice added a commit that referenced this pull request Oct 27, 2012

Merge pull request #13 from jpennell/2-dynamic-port
Fix #2 - Add dynamic port functionality to musik server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment