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

Logging to RO file system #2

Open
joelwking opened this issue Aug 25, 2021 · 1 comment
Open

Logging to RO file system #2

joelwking opened this issue Aug 25, 2021 · 1 comment
Assignees

Comments

@joelwking
Copy link
Owner

If you specify a log destination to a read-only file system, an uncaught exception is thrown:

root@564e2c3773a6:/prezo# python3 library/upload.py 
Traceback (most recent call last):
  File "library/upload.py", line 30, in <module>
    log = logger.Logger(**opts).setup()
  File "/prezo/library/logger/logger.py", line 51, in setup
    fh = logging.FileHandler(self.file_name)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1147, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1176, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
OSError: [Errno 30] Read-only file system: '/opt/powerpoint/log'
@joelwking
Copy link
Owner Author

If you log to a directory which does not exist, you also encounter an exception.

@joelwking joelwking self-assigned this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant