These print are actually progress infomation, should use logger to
print to stderr, other than stdout.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
from samba import gensec
from samba import sd_utils
from samba.compat import get_string
from samba import gensec
from samba import sd_utils
from samba.compat import get_string
+from samba.logger import get_samba_logger
# DEBUG_LEVEL can be changed by scripts with -d
DEBUG_LEVEL = 0
# DEBUG_LEVEL can be changed by scripts with -d
DEBUG_LEVEL = 0
+LOGGER = get_samba_logger(name=__name__)
+
def debug(level, msg, *args):
"""Print a formatted debug message to standard error.
def debug(level, msg, *args):
"""Print a formatted debug message to standard error.
- print("Replaying traffic for %u conversations over %d seconds"
+ LOGGER.info("Replaying traffic for %u conversations over %d seconds"
% (len(conversations), duration))
children = {}
% (len(conversations), duration))
children = {}
"unicodePwd": utf16pw})
end = time.time()
duration = end - start
"unicodePwd": utf16pw})
end = time.time()
duration = end - start
- print("%f\t0\tcreate\tmachine\t%f\tTrue\t" % (end, duration))
+ LOGGER.info("%f\t0\tcreate\tmachine\t%f\tTrue\t" % (end, duration))
def create_user_account(ldb, instance_id, username, userpass):
def create_user_account(ldb, instance_id, username, userpass):
end = time.time()
duration = end - start
end = time.time()
duration = end - start
- print("%f\t0\tcreate\tuser\t%f\tTrue\t" % (end, duration))
+ LOGGER.info("%f\t0\tcreate\tuser\t%f\tTrue\t" % (end, duration))
def create_group(ldb, instance_id, name):
def create_group(ldb, instance_id, name):
})
end = time.time()
duration = end - start
})
end = time.time()
duration = end - start
- print("%f\t0\tcreate\tgroup\t%f\tTrue\t" % (end, duration))
+ LOGGER.info("%f\t0\tcreate\tgroup\t%f\tTrue\t" % (end, duration))
def user_name(instance_id, i):
def user_name(instance_id, i):