2023-12-31 10:45:04 -06:00
|
|
|
package log
|
|
|
|
|
|
|
|
/*
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
}
|
|
|
|
|
|
|
|
and
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/log"
|
|
|
|
}
|
|
|
|
|
|
|
|
Should work exactly the same.
|
|
|
|
|
|
|
|
These are golang log functions that are not changed
|
|
|
|
at all. The arguments are all just passed straight through
|
|
|
|
so this package appears to work exactly like the original ones
|
|
|
|
*/
|
|
|
|
|
2024-01-04 12:34:04 -06:00
|
|
|
// TODO: fill in the other functions from "log". Is there a way to automagically do that?
|
|
|
|
|
2023-12-31 10:45:04 -06:00
|
|
|
import (
|
|
|
|
origlog "log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Println(a ...any) {
|
2024-01-04 12:34:04 -06:00
|
|
|
if ! PRINTLN.B { return }
|
2023-12-31 10:45:04 -06:00
|
|
|
origlog.Println(a...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func Printf(s string, a ...any) {
|
2024-01-04 12:34:04 -06:00
|
|
|
if ! PRINTLN.B { return }
|
2023-12-31 10:45:04 -06:00
|
|
|
origlog.Printf(s, a...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func Fatalf(s string, a ...any) {
|
|
|
|
origlog.Fatalf(s, a...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func Fatal(s string, a ...any) {
|
|
|
|
origlog.Fatalf(s, a...)
|
|
|
|
}
|