Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions picamera2/picamera2.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,63 @@ class Picamera2:
"""Welcome to the PiCamera2 class."""

platform = Platform.get_platform()

DEBUG = logging.DEBUG
INFO = logging.INFO
WARNING = logging.WARNING
ERROR = logging.ERROR
CRITICAL = logging.CRITICAL
_cm = CameraManager()

@property
def DEBUG(self):
"""Now Deprecated

Use:
> import logging
> logging.DEBUG
"""
_log.error("DEBUG is deprecated. Returning `import logging; logging.DEBUG` instead")
return logging.DEBUG

@property
def INFO(self):
"""Now Deprecated

Use:
> import logging
> logging.INFO
"""
_log.error("INFO is deprecated. Returning `import logging; logging.INFO` instead")
return logging.INFO

@property
def WARNING(self):
"""Now Deprecated

Use:
> import logging
> logging.WARNING
"""
_log.error("WARNING is deprecated. Returning `import logging; logging.WARNING` instead")
return logging.WARNING

@property
def ERROR(self):
"""Now Deprecated

Use:
> import logging
> logging.ERROR
"""
_log.error("ERROR is deprecated. Returning `import logging; logging.ERROR` instead")
return logging.ERROR

@property
def CRITICAL(self):
"""Now Deprecated

Use:
> import logging
> logging.CRITICAL
"""
_log.error("CRITICAL is deprecated. Returning `import logging; logging.CRITICAL` instead")
return logging.CRITICAL

@staticmethod
def set_logging(level=logging.WARN, output=sys.stderr, msg=None) -> None:
"""Configure logging for simple standalone use cases.
Expand Down