app.model.logs module

class app.model.logs.Logs(*, id=<factory>, created_at=<factory>, updated_at=<factory>, apiKey_used, oauth_user_id, log_level, message, module, details)[source]

Bases: BaseModel

Represents a general log entry in the system.

Parameters:
  • id (Annotated[str, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=UUID(), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'primary_key': True, 'index': True})])

  • created_at (Annotated[datetime, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=DateTime(timezone=True), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'server_default': <sqlalchemy.sql.functions.now at 0x7fa8900484a0; now>})])

  • updated_at (Annotated[datetime, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=DateTime(timezone=True), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'server_default': <sqlalchemy.sql.functions.now at 0x7fa88fa2a840; now>, 'onupdate': <sqlalchemy.sql.functions.now at 0x7fa88fa2ad20; now>})])

log_level

The severity level of the log (e.g., ‘info’, ‘warning’, ‘error’).

Type:

str

message

The descriptive message of the log entry.

Type:

str

module

The module or component that generated the log.

Type:

str

details

Additional details about the log, stored in JSON format.

Type:

dict

__str__()[source]

Return a string representation of the object.

__repr__()[source]

Return a string representation of the object.

__eq__()[source]

Compare if two objects are equal.

__hash__()[source]

Return the hash of the object.

model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].