1. 17 May, 2019 1 commit
    • spiiroin's avatar
      [mce] Unify license blurbs. JB#33684 · 091d6e7e
      spiiroin authored
      MCE uses LGPL v2.1 (without "or later") license, but due to missing / use
      of different license blurbs this is not always clear enough.
      
      Replace blurbs referring to "LGPLv2" short form which could be either
      LGPL v2.0 or v2.1 without "or later" with the same blurb that is used
      in mce.c file.
      
      Similarly add blurb to source files that are missing one altogether.
      
      Add all authors that can be derived from git logs.
      
      Update Jolla Ltd. copyright statements to match git activity.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      091d6e7e
  2. 08 Mar, 2019 1 commit
    • spiiroin's avatar
      [datapipe] Add enablers for logging datapipe value changes · e2f29495
      spiiroin authored
      A lot of mce functionality is based on pushing events through datapipes,
      which then causes cascade of activity on other datapipes. Tracing this
      can be cumbersome at times.
      
      Add logging hooks to datapipe structure to allow generic value tracing,
      and modify datapipe initialization so that data type specific hooks are
      bound to all datapipes so that all datapipe activity can be tracked by
      invoking mce with logging options such as:
      
        mce -T -ldatapipe.c:*_pipe
      
      Also fix couple of cases where incorrect data type were used for datapipe
      value tracking.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      e2f29495
  3. 11 Oct, 2016 1 commit
    • spiiroin's avatar
      [logging] Add LL_CRUCIAL logging priority. JB#36274 · 96715941
      spiiroin authored
      Now and then there are issues that can't be easily diagnosed without
      logging and the causes might be rare enough that manually enabling
      extra logging after hitting the problem does not accomplish anything.
      
      Provide separate logging priority that is easy to spot and demote
      from mce code base once some specific issue has been found and fixed.
      96715941
  4. 02 Oct, 2015 1 commit
    • spiiroin's avatar
      [dbus] Allow adjusting mce verbosity while it is running. Fixes JB#32492 · 03e2ef58
      spiiroin authored
      Now and then a situation arises where mce verbosity needs to be adjusted
      for debugging purposes without restarting the process. Currently it can
      be done via sending USR1/USR2 signals to mce process, but that is a bit
      clumsy and does not allow choosing the required logging level.
      
      Implement dbus method calls for adjusting mce verbosity and add mcetool
      option that utilizes this to select required verbosity level:
            --set-verbosity=<emerg|alert|crit|err|warning|notice|info|debug>
      
      The change is temporary and mce returns to default verbosity when the
      service is restarted / device is rebooted.
      03e2ef58
  5. 16 Jan, 2015 1 commit
    • spiiroin's avatar
      Tune diagnostic logging · 5fb84646
      spiiroin authored
      Do not complain about missing evdev event mapping configuration as it
      is optional.
      
      Use LOG_NOTICE rather than LOG_CRIT when emitting extra diagnostic
      messages from mce devel builds to stop journalctl from highlighting
      them.
      
      Promote logging of infrequent but important system state changes to
      NOTICE level.
      
      Promote logging of system upgrade related state changes to WARN level
      so that in the future diagnostics are available from both existing
      and upgraded versions in case update problems need to be analyzed.
      
      Demote display state request filtering to DEBUG as it is needed only
      when debugging specific problems.
      5fb84646
  6. 26 Aug, 2014 2 commits
    • spiiroin's avatar
      Fix various issues in mce-log.h · b8034498
      spiiroin authored
      Reserved symbol names (__xxx, _XXX_, etc) were replaced with XXX_.
      
      Added missing dummy counterparts for real functions and removed
      useless and repetitive doxygen documentation of all dummies.
      
      Indented #if blocks to make nesting level more visible.
      
      Split long lines.
      b8034498
    • spiiroin's avatar
      Check logging verbosity before evaluating format parameters · 37b44534
      spiiroin authored
      Vast majority of diagnostic logging from mce is not emitted to journal
      on default verbosity. Spending cpu time evaluating format parameters
      and pushing them to stack just to be discarded makes no sense.
      
      Now verbosity level is checked 1st and potentially time consuming
      parameter evaluation is done only if the message is going to be
      emitted to the journal.
      
      [mce] Check logging verbosity before evaluating format parameters. Fixes JB#22310
      37b44534
  7. 27 May, 2014 1 commit
  8. 26 May, 2014 2 commits
  9. 04 Feb, 2014 1 commit
  10. 16 Jan, 2014 1 commit
    • spiiroin's avatar
      Allow module / function specific debug logging · 33065568
      spiiroin authored
      Just setting mce to debug mode generates so much noise it is no
      longer useful for debugging. After the changes for example
      
        mce -T -l'tklock.c:*datapipe_*' -l'tklock.c:*except*'
      
      can be utilized to get debug logging only from datapipe changes
      seen by tklock module and the exception state machine activity
      resulting from them.
      33065568
  11. 14 Jan, 2014 1 commit
  12. 10 Dec, 2012 1 commit
    • spiiroin's avatar
      Add error level indication when mce logs to stderr · 4b54ac19
      spiiroin authored
      This makes it easier to spot warnings and errors when verbose debug
      logging is enabled.
      
      Also added LL_NOTICE level and adjusted the loglevel_t enumeration
      to be a subset of syslog priorities, i.e. LL_WARN == LOG_WARNING etc.
      4b54ac19
  13. 07 Dec, 2012 1 commit
    • spiiroin's avatar
      Added mce_log_p() predicate · 1b394f56
      spiiroin authored
      For testing whether - say LL_DEBUG - logging is enabled before spending
      cpu cycles for constructing parameters that mce_log() call might ignore
      due to logging level settings.
      1b394f56
  14. 16 Dec, 2010 1 commit