(
self,
run: FlowRun,
*,
stage: str,
status: str,
message: str,
details: dict[str, Any] | None = None,
level: int = logging.INFO,
)
| 140 | ) |
| 141 | |
| 142 | def log_event( |
| 143 | self, |
| 144 | run: FlowRun, |
| 145 | *, |
| 146 | stage: str, |
| 147 | status: str, |
| 148 | message: str, |
| 149 | details: dict[str, Any] | None = None, |
| 150 | level: int = logging.INFO, |
| 151 | ) -> None: |
| 152 | entry = self._base_entry( |
| 153 | stage=stage, |
| 154 | status=status, |
| 155 | message=message, |
| 156 | account_id=run.account_id, |
| 157 | run_id=run.run_id, |
| 158 | action=run.action, |
| 159 | source=run.source, |
| 160 | product_id=run.product_id, |
| 161 | pay_type=run.pay_type, |
| 162 | details=details, |
| 163 | ) |
| 164 | self._write_entry(entry) |
| 165 | self.logger.log( |
| 166 | level, |
| 167 | "[%s][%s][%s/%s] %s", |
| 168 | run.account_id, |
| 169 | run.run_id, |
| 170 | run.action, |
| 171 | stage, |
| 172 | message, |
| 173 | ) |
| 174 | |
| 175 | def log_account_event( |
| 176 | self, |
no test coverage detected