LoggingSettings#

class stellarphot.settings.LoggingSettings(*arg, logfile: str | None = None, console_log: bool = True)[source]#

Bases: BaseModelWithTableRep

Settings for logging.

Parameters:
logfilestr, optional (Default: None)

Name of the file to which log messages should be written. It will be created in the directory_with_images directory. If None, no log file will be created.

console_log: bool, optional (Default: True)

If True, log messages will be written to stdout. If False, log messages will not be written to stdout.

Examples

>>> from stellarphot.settings import LoggingSettings
>>> logging_settings = LoggingSettings()
>>> logging_settings
LoggingSettings(logfile=None, console_log=True)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.