1. 18 Jul, 2019 3 commits
    • Marius Vlad's avatar
    • Marius Vlad's avatar
      weston-debug: Make it easier to separate weston_debug_stream · 8f329e25
      Marius Vlad authored
      This way we can split easier weston_debug_stream into a separate file.
      Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
    • Marius Vlad's avatar
      weston-debug: Introduce weston_log_subscription and weston_log_subscriber objects · e0a858a5
      Marius Vlad authored
      Adds a minimalistic API for managing the subscription object. The
      subscribe functionality will be brought in once we re-organize a bit
      weston-debug-stream and split it properly. It extends the logging
      context with a linked list of potential subscription and adds a linked
      list of subscriptions in the log scope.
      This patch represents the start of a logging framework for weston. It's
      being built around weston-debug, with the intent to superseded it, and
      make weston-debug a client of the framework. Further more the logging
      framework should replace current logging handler and allow other types
      of streams to be used.
      Currently present in libweston under weston-debug we have log scopes, debug
      streams and a logging context.
      With this patch, two (internal) objects are being added: the concept of
      a subscriber and the concept of subscription.  The subscription object
      is a ephemeral object, implicitly managed which is created each time one
      would want to a subscribe to a scope. The scope will maintain a list of
      subscriptions and will continue to be explicitly managed.
      The streams will use the subscriber object as a base class to extend
      upon. By doing so it allows to customize the stream with specific
      functions that manipulate the underlaying storage. The subscriber object
      will require a subscribe function and specific stream functions and like
      the scope, will be explicitly managed.
      Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
      Suggested-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>