Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F13819892
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
695 B
Subscribers
None
View Options
diff --git a/log/log.go b/log/log.go
new file mode 100644
index 0000000..ec37124
--- /dev/null
+++ b/log/log.go
@@ -0,0 +1,27 @@
+// Package log prints different kinds of log messages in the formats we like.
+package log
+
+import (
+ "log"
+ "os"
+)
+
+var (
+ InfoLog *log.Logger
+ ErrorLog *log.Logger
+)
+
+func init() {
+ InfoLog = log.New(os.Stdout, "", log.Ldate|log.Ltime)
+ ErrorLog = log.New(os.Stderr, "ERROR: ", log.Ldate|log.Ltime|log.Lshortfile)
+}
+
+// Info logs an informational message to Stdout.
+func Info(s string, v ...interface{}) {
+ InfoLog.Printf(s, v...)
+}
+
+// Error logs an error to Stderr.
+func Error(s string, v ...interface{}) {
+ ErrorLog.Printf(s, v...)
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Feb 16, 6:32 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3629296
Attached To
rWC Write.as Web Core
Event Timeline
Log In to Comment