summaryrefslogtreecommitdiff
path: root/info.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-28 12:35:05 -0600
committerJeff Carr <[email protected]>2023-12-28 12:35:05 -0600
commit5766e86595bb7bc4c16c37f8ed47bcf0db25d82b (patch)
treeb3c588102c16c943db7235d6745865b974d30e55 /info.go
initial commit
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'info.go')
-rw-r--r--info.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/info.go b/info.go
new file mode 100644
index 0000000..b390062
--- /dev/null
+++ b/info.go
@@ -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")
+}