summaryrefslogtreecommitdiff
path: root/original.go
diff options
context:
space:
mode:
Diffstat (limited to 'original.go')
-rw-r--r--original.go36
1 files changed, 34 insertions, 2 deletions
diff --git a/original.go b/original.go
index b76dcf6..02fb701 100644
--- a/original.go
+++ b/original.go
@@ -19,18 +19,50 @@ package log
*/
// TODO: fill in the other functions from "log". Is there a way to automagically do that?
+// the full list is:
+/*
+ type Logger
+
+ // NEED THESE
+ func (l *Logger) Fatal(v ...any)
+ func (l *Logger) Fatalf(format string, v ...any)
+ func (l *Logger) Fatalln(v ...any)
+ func (l *Logger) Panic(v ...any)
+ func (l *Logger) Panicf(format string, v ...any)
+ func (l *Logger) Panicln(v ...any)
+ func (l *Logger) Print(v ...any)
+ func (l *Logger) Printf(format string, v ...any)
+ func (l *Logger) Println(v ...any)
+
+ func Default() *Logger
+ func New(out io.Writer, prefix string, flag int) *Logger
+
+ // what are these?
+ func (l *Logger) Flags() int
+ func (l *Logger) SetFlags(flag int)
+ func (l *Logger) Prefix() string
+ func (l *Logger) SetPrefix(prefix string)
+
+ // probably not this stuff
+ func (l *Logger) SetOutput(w io.Writer)
+ func (l *Logger) Output(calldepth int, s string) error
+ func (l *Logger) Writer() io.Writer
+*/
+
import (
origlog "log"
)
func Println(a ...any) {
- if ! PRINTLN.B { return }
+ if ! PRINTLN.Ok() { return }
+ if ! PRINTLN.b { return }
origlog.Println(a...)
}
func Printf(s string, a ...any) {
- if ! PRINTLN.B { return }
+ if ! PRINTLN.Ok() { return }
+ if ! PRINTLN.b { return }
origlog.Printf(s, a...)
}