For safety, Python charm-helpers juju-log command should insert a "--" before the log message.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charm Tools |
Fix Released
|
Undecided
|
Benji York |
Bug Description
The Go version of juju-log currently behaves differently than the Python one: see bug 1130771. This breaks the charm-helpers log command, and in particular the log_entry and log_exit functions (see /helpers/
A change that would both work around the issue and be a reasonable long term change would be to make the log command insert a '--' before any log message: "log = command('juju-log', '--')" would work.
Pertinent excerpt follows.
log = command('juju-log')
# We create a juju_status Command here because it makes testing much,
# much easier.
juju_status = lambda: command(
def log_entry():
log("--> Entering {}".format(
def log_exit():
log("<-- Exiting {}".format(
Related branches
- Marco Ceppi (community): Approve
-
Diff: 71 lines (+44/-1)2 files modifiedhelpers/python/charmhelpers/__init__.py (+4/-1)
helpers/python/charmhelpers/tests/test_charmhelpers.py (+40/-0)
Changed in charm-tools: | |
assignee: | nobody → Benji York (benji) |
status: | New → In Progress |
Changed in charm-tools: | |
status: | In Progress → Fix Released |