Debug-Log CLI / API Changes

Dimiter Naydenov dimiter.naydenov at canonical.com
Tue Feb 18 16:01:01 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

As you may know, we're about to add extra features to the debug-log
juju command, which will add filtering and the ability to specify
entities which to include/exclude from the output. There are API
changes needed, but this message is to inform / ask for comments about
the format of the CLI arguments for debug-log.

The API for debug-log will support internally a list of pairs
name-regexp and an exclude flag. Only the name part is required. In
CLI terms, we're proposing to express this as:

juju debug-log name1[=regexp1] name2[=regexp2] ... --exclude
name3[=regexp3] --exclude name4[=regexp4] ...

Which is equivalent to the more explicit:

juju debug-log --include name1[=regexp1] --include name2[=regexp2] ...
- --exclude name3[=regexp3] --exclude name4[=regexp4] ...

The full syntax for --include and --exclude is --include=name=regexp,
where both the first "=" and the "=regexp" parts are optional. If no
- --include arguments are specified, they are assumed.

Examples:
juju debug-log --include wordpress/0='.*config-changed.*'
(

juju debug-log --exclude 0=started
(show all except any lines from machine 0 containing "started")

juju debug-log environment=hook --exclude environment='.*committed.*hook'
(show all lines containing "hook" but not ".*committed.*hook")

Thoughts?

Dimiter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTA4O9AAoJENzxV2TbLzHw4rwH/2iwSU5/a0FarcYuZv9cxmWR
5jasvWLQwrKwfJV0AxqecZyEy7YyaoyEdl5WTCyf2bT4wd7XcuHEZa5GhOv0LVBa
nCRXX+rFu4KAM6LeEW/UYc7gJjIVNwCNjfX3nvGEsGbJMOLYFJhV1VsTFi4xR9XY
ynwt3Hza+adDBplsTK3vNOnXdvBJK8xuIpYehUHagr0ux9QlVTszTeTaIdPaN5UW
9cI4ARS/BGGnONe65L4E+e2dVHuIwlqKQEUi33fHuWdlQ5tCqTHsmq40A8fV5X7Y
iKa8AgnBEZYQLvBVs9V5DYZWE2w33qrqu+HU7RLh2j/qCod+Vq0RUrAS0v+T6Jw=
=NBvp
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list