LoggingSettings#
- class stellarphot.settings.LoggingSettings(*arg, logfile: str | None = None, console_log: bool = True)[source]#
Bases:
BaseModelWithTableRepSettings 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_imagesdirectory. If None, no log file will be created.- console_log: bool, optional (Default: True)
If
True, log messages will be written to stdout. IfFalse, 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.selfis explicitly positional-only to allowselfas a field name.Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].Attributes Documentation
- model_config = {'extra': 'forbid', 'json_schema_extra': {'description': 'Settings for logging.'}, 'validate_assignment': True, 'validate_default': True}#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].