LoggerWarn returns a logger suitable for use in tests which outputs only at warn or above. Useful in tests where particularly noisy log output is expected.
(tb testutil.TestingTB)
| 208 | // warn or above. Useful in tests where particularly noisy log output is |
| 209 | // expected. |
| 210 | func LoggerWarn(tb testutil.TestingTB) *slog.Logger { |
| 211 | tb.Helper() |
| 212 | return slogtest.NewLogger(tb, &slog.HandlerOptions{Level: slog.LevelWarn}) |
| 213 | } |
| 214 | |
| 215 | // TestDatabaseURL returns `TEST_DATABASE_URL` or a default URL pointing to |
| 216 | // `river_test` and with suitable connection configuration defaults. |
searching dependent graphs…