QueryLogger batches query log entries and writes them to a DuckLake table.
| 61 | |
| 62 | var newPostgresQueryLogSink = func(ctx context.Context, cfg Config) (QueryLogSink, error) { |
| 63 | return NewPostgresQueryLoggerContext(ctx, cfg.DuckLake, cfg.QueryLog) |
| 64 | } |
| 65 | |
| 66 | // NewQueryLogSink creates the native Postgres-backed query-log sink. |
| 67 | func NewQueryLogSink(cfg Config) (QueryLogSink, error) { |
| 68 | if !cfg.QueryLog.Enabled || cfg.DuckLake.MetadataStore == "" { |
| 69 | return nil, nil |
| 70 | } |
| 71 | ctx, cancel := context.WithTimeout(context.Background(), queryLogInitTimeout) |
| 72 | defer cancel() |
| 73 | return newPostgresQueryLogSink(ctx, cfg) |
nothing calls this directly
no outgoing calls
no test coverage detected