Skip to content

Commit 88059a2

Browse files
committed
Deal with Swiftbar change
Swiftbar now is capturing `stderr` in addition to `stdout`, which made all the logging info get spammed to the menubar. We now default to log level critical - log output is only necessary during debugging, so stifle all log output during normal runs by Swiftbar and Xbar. Closes #26 Signed-off-by: Joe Block <[email protected]>
1 parent 46004dd commit 88059a2

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020

2121
## 1.3.1
2222

23-
- Add `/opt/homebrew/bin` to the plugin's `$PATH` when it exists and is a directory.
23+
- Add `/opt/homebrew/bin` to the plugin's `$PATH` when it exists and is a directory.
24+
25+
## 1.3.2
26+
27+
- Swiftbar started capturing `stderr` in addition to `stdout`, causing log messages to spam the menu bar. Default to log level critical so we don't spam log messages (that no one was seeing anyway) except when we're testing.

lima-plugin

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUNNING_VM_COLOR = "#29cc00"
3434
# Stopped VM color (default red)
3535
STOPPED_VM_COLOR = "#ff0033"
3636

37-
VERSION = "1.3.1"
37+
VERSION = "1.3.2"
3838

3939

4040
def logSetup(level: str = "INFO"):
@@ -72,7 +72,7 @@ def parseCLI():
7272
type=str.upper,
7373
help="set log level",
7474
choices=["DEBUG", "INFO", "ERROR", "WARNING", "CRITICAL"],
75-
default="INFO",
75+
default="CRITICAL",
7676
)
7777
parser.add_argument(
7878
"--vm", "--virtual-machine", type=str, help="Which vm to use", default="default"
@@ -325,7 +325,7 @@ def imageOps(action: str, image: str, vm: str = "default"):
325325
:param str image: What image to do the action on
326326
:param str vm: Which VM is the image in?
327327
"""
328-
logging.critical("imageOps")
328+
logging.info("imageOps")
329329
logging.info("action: %s" % action)
330330
logging.info("image: %s" % image)
331331
logging.info("vm: %s" % vm)
@@ -371,7 +371,7 @@ def vmOps(action: str, vm: str = "default"):
371371
:param str action: What action to run - should be start or stop
372372
:param str vm: Name of VM to act on
373373
"""
374-
logging.critical("vmOps")
374+
logging.info("vmOps")
375375
logging.debug("action: %s" % action)
376376
logging.debug("vm: %s" % vm)
377377

0 commit comments

Comments
 (0)