summaryrefslogtreecommitdiff
path: root/examples/buttons
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-29 03:00:03 -0600
committerJeff Carr <[email protected]>2023-12-29 03:00:03 -0600
commit015847b28ee5dc5c7cfd29dfcbe14e3a2624569c (patch)
treeb69c43edf3c57d9cdc12b29f75a8c43d2059c2d1 /examples/buttons
parent48dfdf322b2cf379d8deeff678747907b604637f (diff)
add 'gadgets'
attempt func (n *gui.Node) blah() definition better docs for pkg.go.dev how logging should work fix syntax links for pkg.go.dev Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'examples/buttons')
-rwxr-xr-xexamples/buttons/buttonpluginbin6062120 -> 0 bytes
-rw-r--r--examples/buttons/log.go20
2 files changed, 20 insertions, 0 deletions
diff --git a/examples/buttons/buttonplugin b/examples/buttons/buttonplugin
deleted file mode 100755
index 3f4dee3..0000000
--- a/examples/buttons/buttonplugin
+++ /dev/null
Binary files differ
diff --git a/examples/buttons/log.go b/examples/buttons/log.go
index bf3d1a5..f8279af 100644
--- a/examples/buttons/log.go
+++ b/examples/buttons/log.go
@@ -24,6 +24,25 @@ var f2 *os.File
var err error
*/
+/* from gocron:
+
+// DefaultLogger is used by Cron if none is specified.
+var DefaultLogger Logger = PrintfLogger(log.New(os.Stdout, "cron: ", log.LstdFlags))
+
+// DiscardLogger can be used by callers to discard all log messages.
+var DiscardLogger Logger = PrintfLogger(log.New(ioutil.Discard, "", 0))
+
+// Logger is the interface used in this package for logging, so that any backend
+// can be plugged in. It is a subset of the github.com/go-logr/logr interface.
+type Logger interface {
+ // Info logs routine messages about cron's operation.
+ Info(msg string, keysAndValues ...interface{})
+ // Error logs an error condition.
+ Error(err error, msg string, keysAndValues ...interface{})
+}
+
+*/
+
func init() {
arg.MustParse(&args)
fmt.Println(args.Foo, args.Bar, args.User)
@@ -34,6 +53,7 @@ func init() {
log.Log(true, "INIT() args.GuiArg.Gui =", gui.GuiArg.Gui)
/*
+ // from: https://github.com/robfig/cron/blob/master/logger.go
log.Println()
log.Println("STDOUT is now at /tmp/guilogfile")
log.Println("STDOUT is now at /tmp/guilogfile")