DatabaseLogCtx extends the parent context with a database name.
(parent context.Context, databaseName string, config *DbLogConfig)
| 228 | |
| 229 | // DatabaseLogCtx extends the parent context with a database name. |
| 230 | func DatabaseLogCtx(parent context.Context, databaseName string, config *DbLogConfig) context.Context { |
| 231 | newCtx := getLogCtx(parent) |
| 232 | newCtx.Database = databaseName |
| 233 | newCtx.DbLogConfig = config |
| 234 | return LogContextWith(parent, &newCtx) |
| 235 | } |
| 236 | |
| 237 | // AuditLogCtx extends the parent context with additional audit fields |
| 238 | func AuditLogCtx(parent context.Context, additionalAuditFields map[string]any) context.Context { |