LOGGING AddDatabaseLogContext adds database name to the parent context for logging
(ctx context.Context)
| 2162 | |
| 2163 | // AddDatabaseLogContext adds database name to the parent context for logging |
| 2164 | func (dbCtx *DatabaseContext) AddDatabaseLogContext(ctx context.Context) context.Context { |
| 2165 | if dbCtx != nil && dbCtx.Name != "" { |
| 2166 | dbLogCtx := base.DatabaseLogCtx(ctx, dbCtx.Name, dbCtx.Options.LoggingConfig) |
| 2167 | return dbLogCtx |
| 2168 | } |
| 2169 | return ctx |
| 2170 | } |
| 2171 | |
| 2172 | // AddBucketUserLogContext adds bucket user to the parent context for logging. This is used to mark actions not caused by a user. |
| 2173 | func (dbCtx *DatabaseContext) AddBucketUserLogContext(ctx context.Context) context.Context { |