From 54f4c4be3d35cc2c86706aed673392a01d5c7e45 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Jan 2025 04:08:43 -0600 Subject: [PATCH] quiet output --- README.md | 5 +++++ config.go | 2 +- log.go | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 log.go diff --git a/README.md b/README.md index f85d699..cb50439 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ protobuf definition files for zookeeper + +* experimental. at this point, it's just stubbed in +* zookeeper is similar to the apache zookeeper project +* you can use it to maintain the systems in your cluster +* zookeeper works with virtigo to maintain your private cloud diff --git a/config.go b/config.go index 6d1d870..800b7ba 100644 --- a/config.go +++ b/config.go @@ -99,7 +99,7 @@ func (m *Machine) ConfigLoad() error { m.Hostname = hostname m.Distro = detectDistro() m.initPackages() - log.Info("zoopb.ConfigLoad()", m.Hostname, "runs", m.Distro, "with", m.Packages.Len(), "packages") + log.Log(INFO, "zoopb.ConfigLoad()", m.Hostname, "runs", m.Distro, "with", m.Packages.Len(), "packages") return nil } diff --git a/log.go b/log.go new file mode 100644 index 0000000..55d93eb --- /dev/null +++ b/log.go @@ -0,0 +1,16 @@ +package zoopb + +import ( + "go.wit.com/log" +) + +var INFO *log.LogFlag +var WARN *log.LogFlag + +func init() { + full := "go.wit.com/lib/protobuf/zoopb" + short := "zoopb" + + INFO = log.NewFlag("INFO", false, full, short, "general forgepb things") + WARN = log.NewFlag("WARN", true, full, short, "zoopb warnings") +}