-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdogma.go
23 lines (21 loc) · 1001 Bytes
/
dogma.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package testkit
func log(t TestingT, args ...any) { t.Log(args...) }
func logf(t TestingT, f string, args ...any) { t.Logf(f, args...) }
// ABOUT THIS FILE (dogma.go)
//
// Go's built-in test framework includes the filename and line number of any
// calls that are made to the testing.T.Log() function and its variants.
//
// In an effort to make it clearer that the log output produced by this package
// originates within Dogma's tooling we perform all engine logging via the
// functions above.
//
// Note also, that all of the logging calls within this file are made on a
// single-digit line-number, ensuring that all output is aligned and as short as
// possible.
//
// Go *does* include the testing.T.Helper() function, which marks the
// calling-function as a "helper" so that it does not get considered as the
// source of logs. Unfortunately, this only marks a single stack frame as a
// "helper", and so it does not work for log messages generated deeply within
// the engine.