* Capture a log with the given level. * * @param level - The level of the log. * @param message - The message to log. * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100. * @param scope - The scope to capture the log with. * @param severity
( level: LogSeverityLevel, message: ParameterizedString, attributes?: Log['attributes'], scope?: Scope, severityNumber?: Log['severityNumber'], )
| 13 | * @param severityNumber - The severity number of the log. |
| 14 | */ |
| 15 | function captureLog( |
| 16 | level: LogSeverityLevel, |
| 17 | message: ParameterizedString, |
| 18 | attributes?: Log['attributes'], |
| 19 | scope?: Scope, |
| 20 | severityNumber?: Log['severityNumber'], |
| 21 | ): void { |
| 22 | _INTERNAL_captureLog({ level, message, attributes, severityNumber }, scope); |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Additional metadata to capture the log with. |