summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'args.go')
-rw-r--r--args.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/args.go b/args.go
new file mode 100644
index 0000000..87deb0f
--- /dev/null
+++ b/args.go
@@ -0,0 +1,22 @@
+package log
+
+import (
+ arg "github.com/alexflint/go-arg"
+)
+
+//
+// Attempt to switch logging to syslog on linux
+//
+
+var argLog ArgLog
+
+// This struct can be used with the go-arg package
+type ArgLog struct {
+ LogTmp bool `arg:"--log-tmp" help:"send all output /tmp"`
+ LogStdout bool `arg:"--log-stdout" help:"send all output to STDOUT"`
+ LogQuiet bool `arg:"--log-quiet" help:"suppress all output"`
+}
+
+func init() {
+ arg.Register(&argLog)
+}