initial commit

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-12-28 12:35:05 -06:00
commit 5766e86595
4 changed files with 50 additions and 0 deletions

9
error.go Normal file
View File

@ -0,0 +1,9 @@
package log
import (
origlog "log"
)
func Error(a ...any) {
origlog.Println(a...)
}

23
info.go Normal file
View File

@ -0,0 +1,23 @@
package log
import (
"os"
golanglog "log"
)
func Info(a ...any) {
golanglog.Println(a...)
}
// start writing all the logging to a tmp file
func SetTmp() {
f, err := os.OpenFile("/tmp/guilogfile", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
if err != nil {
golanglog.Fatalf("error opening file: %v", err)
}
// hmm. is there a trick here or must this be in main()
// defer f.Close()
golanglog.SetOutput(f)
golanglog.Println("This is a test log entry")
}

9
log.go Normal file
View File

@ -0,0 +1,9 @@
package log
import (
origlog "log"
)
func Println(a ...any) {
origlog.Println(a...)
}

9
warn.go Normal file
View File

@ -0,0 +1,9 @@
package log
import (
origlog "log"
)
func Warn(a ...any) {
origlog.Println(a...)
}