jw.pkg.App: Use lib.log

Replace print() by log().

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-01-21 15:35:09 +01:00
commit 737f3986df

View file

@ -6,6 +6,8 @@
import os, sys, argparse, pwd, re import os, sys, argparse, pwd, re
from .lib.App import App as Base from .lib.App import App as Base
from .lib.log import *
from .cmds.build import * from .cmds.build import *
# meaning of pkg.requires.xxx variables # meaning of pkg.requires.xxx variables
@ -59,7 +61,6 @@ class App(Base):
self.dep_cache = {} self.dep_cache = {}
self.my_dir = os.path.dirname(os.path.realpath(__file__)) self.my_dir = os.path.dirname(os.path.realpath(__file__))
self.opt_debug = False
self.res_cache = ResultCache() self.res_cache = ResultCache()
self.topdir = None self.topdir = None
@ -93,14 +94,13 @@ class App(Base):
return await super()._run(args) return await super()._run(args)
def debug(self, *objs): def debug(self, *objs):
if self.opt_debug: log(DEBUG, *objs)
print("DEBUG: ", *objs, file = sys.stderr)
def warn(self, *objs): def warn(self, *objs):
print("WARNING: ", *objs, file = sys.stderr) log(WARNING, *objs)
def err(self, *objs): def err(self, *objs):
print("ERR: ", *objs, file = sys.stderr) log(ERR, *objs)
def proj_dir(self, name): def proj_dir(self, name):
if name == self.top_name: if name == self.top_name: