Mi: mi backend + mi for command version
authorJonathan Rajotte <jonathan.r.julien@gmail.com>
Sun, 6 Apr 2014 19:30:32 +0000 (15:30 -0400)
committerJonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Tue, 22 Jul 2014 20:14:56 +0000 (16:14 -0400)
commitc7e35b037773dbbfe10178c946ba44feefb226e1
treec891a28a09d2961a8af6427c7ab520a096259cff
parentf9b10a528e51af8c58fdf360302271b5ed6ff873
Mi: mi backend + mi for command version

The machine interface option is now available for version. Other
commands will shortly follow. Mi backend is expected to grow with
addition of mi support to other commands.

How to use:
lttng --mi <mi_output_type> <command>

This syntax will be the same for all commands. Currently *only xml is
supported as machine interface output.*

As for errors handling, if an error/warning occurs while using mi it
will be reported on stderr as normal. The integrity of the mi output
cannot be guaranteed if an error/warning occurs. The error output format
is consistent and easy for a machine client to parse. Thus no mi output
format is required for error output.

Example:
lttng --mi xml version
Output:
<?xml version="1.0" encoding="UTF-8"?>
  <command>
    <name>version</name>
    <output>
      <string>2.4.0-rc2</string>
      <major>2</major>
      <minor>4</minor>
      <patchLevel>0</patchLevel>
      <name>Époque Opaque</name>
      <description>The Époque Opaque is a black IPA from Trou du Diable
      brewery. The nose is eerily reminiscent of the coffee crisp candy from
      of our childhood. These strong mocha accents are present on the palate,
      which are quickly subdued by Japanese and Australian hops leading to a
      final state of satisfaction enjoyable for any fan of bitter
      beer.</description>
      <url>http://lttng.org</url>
      <license>lttng is free software and under the GPL license and part
      LGPL</license>
  </output>
</command>

Signed-off-by: Olivier Cotte <olivier.cotte@polymtl.ca>
Signed-off-by: Jonathan Rajotte <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
34 files changed:
include/lttng/lttng-error.h
include/lttng/lttng.h
src/bin/lttng-consumerd/lttng-consumerd.c
src/bin/lttng/commands/add_context.c
src/bin/lttng/commands/calibrate.c
src/bin/lttng/commands/create.c
src/bin/lttng/commands/destroy.c
src/bin/lttng/commands/disable_channels.c
src/bin/lttng/commands/disable_events.c
src/bin/lttng/commands/enable_channels.c
src/bin/lttng/commands/enable_events.c
src/bin/lttng/commands/list.c
src/bin/lttng/commands/load.c
src/bin/lttng/commands/save.c
src/bin/lttng/commands/set_session.c
src/bin/lttng/commands/snapshot.c
src/bin/lttng/commands/start.c
src/bin/lttng/commands/stop.c
src/bin/lttng/commands/version.c
src/bin/lttng/commands/view.c
src/bin/lttng/lttng.c
src/common/Makefile.am
src/common/error.c
src/common/error.h
src/common/mi-lttng.c [new file with mode: 0644]
src/common/mi-lttng.h [new file with mode: 0644]
src/lib/lttng-ctl/lttng-ctl.c
tests/unit/ini_config/ini_config.c
tests/unit/test_kernel_data.c
tests/unit/test_session.c
tests/unit/test_uri.c
tests/unit/test_ust_data.c
tests/unit/test_utils_expand_path.c
tests/unit/test_utils_parse_size_suffix.c
This page took 0.040712 seconds and 4 git commands to generate.