diff options
| author | Jeff Carr <[email protected]> | 2023-12-28 12:35:05 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-28 12:35:05 -0600 |
| commit | 5766e86595bb7bc4c16c37f8ed47bcf0db25d82b (patch) | |
| tree | b3c588102c16c943db7235d6745865b974d30e55 /info.go | |
initial commit
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'info.go')
| -rw-r--r-- | info.go | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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") +} |
