Debug-Log CLI / API Changes

William Reade william.reade at canonical.com
Tue Feb 18 17:48:51 UTC 2014


I'd prefer to drop --include entirely, and make positional args automatic
includes; and never to mention "environment" at the CLI level; but that
then makes it hard to distinguish between an entity name and a regex to
apply to the whole environment... *unless* we add a --filter arg for that
specific case. Does that work, or do we still have ambiguity lurking? There
might be an issue with regexes containing "="...


On Tue, Feb 18, 2014 at 5:01 PM, Dimiter Naydenov <
dimiter.naydenov at canonical.com> wrote:

> -----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-----
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140218/18874102/attachment-0001.html>


More information about the Juju-dev mailing list