<div dir="ltr">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 "="...</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 18, 2014 at 5:01 PM, Dimiter Naydenov <span dir="ltr"><<a href="mailto:dimiter.naydenov@canonical.com" target="_blank">dimiter.naydenov@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi all,<br>
<br>
As you may know, we're about to add extra features to the debug-log<br>
juju command, which will add filtering and the ability to specify<br>
entities which to include/exclude from the output. There are API<br>
changes needed, but this message is to inform / ask for comments about<br>
the format of the CLI arguments for debug-log.<br>
<br>
The API for debug-log will support internally a list of pairs<br>
name-regexp and an exclude flag. Only the name part is required. In<br>
CLI terms, we're proposing to express this as:<br>
<br>
juju debug-log name1[=regexp1] name2[=regexp2] ... --exclude<br>
name3[=regexp3] --exclude name4[=regexp4] ...<br>
<br>
Which is equivalent to the more explicit:<br>
<br>
juju debug-log --include name1[=regexp1] --include name2[=regexp2] ...<br>
- --exclude name3[=regexp3] --exclude name4[=regexp4] ...<br>
<br>
The full syntax for --include and --exclude is --include=name=regexp,<br>
where both the first "=" and the "=regexp" parts are optional. If no<br>
- --include arguments are specified, they are assumed.<br>
<br>
Examples:<br>
juju debug-log --include wordpress/0='.*config-changed.*'<br>
(<br>
<br>
juju debug-log --exclude 0=started<br>
(show all except any lines from machine 0 containing "started")<br>
<br>
juju debug-log environment=hook --exclude environment='.*committed.*hook'<br>
(show all lines containing "hook" but not ".*committed.*hook")<br>
<br>
Thoughts?<br>
<br>
Dimiter<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1<br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
iQEcBAEBAgAGBQJTA4O9AAoJENzxV2TbLzHw4rwH/2iwSU5/a0FarcYuZv9cxmWR<br>
5jasvWLQwrKwfJV0AxqecZyEy7YyaoyEdl5WTCyf2bT4wd7XcuHEZa5GhOv0LVBa<br>
nCRXX+rFu4KAM6LeEW/UYc7gJjIVNwCNjfX3nvGEsGbJMOLYFJhV1VsTFi4xR9XY<br>
ynwt3Hza+adDBplsTK3vNOnXdvBJK8xuIpYehUHagr0ux9QlVTszTeTaIdPaN5UW<br>
9cI4ARS/BGGnONe65L4E+e2dVHuIwlqKQEUi33fHuWdlQ5tCqTHsmq40A8fV5X7Y<br>
iKa8AgnBEZYQLvBVs9V5DYZWE2w33qrqu+HU7RLh2j/qCod+Vq0RUrAS0v+T6Jw=<br>
=NBvp<br>
-----END PGP SIGNATURE-----<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>