aboutsummaryrefslogtreecommitdiff
path: root/pkg/log/log_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/log/log_test.go')
-rw-r--r--pkg/log/log_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/log/log_test.go b/pkg/log/log_test.go
new file mode 100644
index 0000000..9f4076d
--- /dev/null
+++ b/pkg/log/log_test.go
@@ -0,0 +1,21 @@
+package log
+
+import (
+ "os"
+)
+
+func Example() {
+ SetOutput(os.Stdout)
+ SetLevel(WarningLevel)
+ SetDate(false)
+ SetColor(false)
+
+ Debug("some debug number: %d\n", 10)
+ Info("some info number: %d\n", 20)
+ Warning("some warning number: %d\n", 30)
+ Error("some error number: %d\n", 40)
+
+ // Output:
+ // [WARN] some warning number: 30
+ // [ERRO] some error number: 40
+}