Module: check_mk
Branch: master
Commit: 793f9337742f9f97136b27f9e245267c6cc26bbd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=793f9337742f9f…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Jul 18 15:16:51 2017 +0200
Refactor Logger behind LoggerAdaptor
Refactor all code using logging to use a Logger instance through the
LoggerAdaptor interface. The purpose is to
1) enable testing by cutting dependencies by mocking the Logger.
2) later possibly replace the logger by a more sane solution, e.g. the
Logger from enterprise CMC.
Also refactor crash handling into CrashHandler class in order to manage
dependency to Logger.
Change-Id: I6a26f738125ff7b85bfaa44b6328831e7d8e9f11
---
agents/windows/Configuration.cc | 6 +-
agents/windows/Configuration.h | 10 +-
.../windows/{crashhandling.cc => CrashHandler.cc} | 63 +++++-----
agents/windows/{crashhandling.h => CrashHandler.h} | 28 ++++-
agents/windows/Environment.cc | 9 +-
agents/windows/Environment.h | 10 +-
agents/windows/EventLog.cc | 32 +++---
agents/windows/EventLog.h | 8 +-
agents/windows/ExternalCmd.cc | 9 +-
agents/windows/ExternalCmd.h | 7 +-
agents/windows/IEventLog.cc | 11 +-
agents/windows/IEventLog.h | 10 +-
agents/windows/ListenSocket.cc | 18 +--
agents/windows/ListenSocket.h | 7 +-
agents/windows/{logging.cc => Logger.cc} | 127 ++++++++++++---------
agents/windows/Logger.h | 82 +++++++++++++
agents/windows/{logging.h => LoggerAdaptor.h} | 36 ++++--
agents/windows/Makefile | 4 +-
agents/windows/OHMMonitor.cc | 17 +--
agents/windows/OHMMonitor.h | 8 +-
agents/windows/OutputProxy.cc | 22 ++--
agents/windows/OutputProxy.h | 9 +-
agents/windows/PerfCounter.cc | 1 -
agents/windows/Section.cc | 26 +++--
agents/windows/Section.h | 29 +++--
agents/windows/SectionManager.cc | 91 ++++++++-------
agents/windows/SectionManager.h | 15 ++-
agents/windows/Thread.cc | 11 +-
agents/windows/Thread.h | 19 ++-
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1340416 -> 1372160 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15809577 -> 17176174 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1340416 -> 1372160 bytes
agents/windows/check_mk_agent.cc | 85 +++++++-------
agents/windows/check_mk_agent.exe | Bin 1318400 -> 1354240 bytes
agents/windows/check_mk_agent.msi | Bin 2928640 -> 2997248 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13668491 -> 14999417 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1318400 -> 1354240 bytes
agents/windows/crash.exe | Bin 101624 -> 358864 bytes
agents/windows/install_agent-64.exe | Bin 591884 -> 604756 bytes
agents/windows/install_agent.exe | Bin 589468 -> 604190 bytes
agents/windows/nowin.exe | Bin 103760 -> 361000 bytes
agents/windows/sections/SectionCheckMK.cc | 71 +++++++-----
agents/windows/sections/SectionCheckMK.h | 14 ++-
agents/windows/sections/SectionCrashDebug.cc | 28 ++---
agents/windows/sections/SectionCrashDebug.h | 7 +-
agents/windows/sections/SectionDF.cc | 8 +-
agents/windows/sections/SectionDF.h | 9 +-
agents/windows/sections/SectionEventlog.cc | 30 ++---
agents/windows/sections/SectionEventlog.h | 9 +-
agents/windows/sections/SectionFileinfo.cc | 9 +-
agents/windows/sections/SectionFileinfo.h | 7 +-
agents/windows/sections/SectionGroup.cc | 13 +--
agents/windows/sections/SectionGroup.h | 8 +-
agents/windows/sections/SectionLogwatch.cc | 49 ++++----
agents/windows/sections/SectionLogwatch.h | 9 +-
agents/windows/sections/SectionMRPE.cc | 30 ++---
agents/windows/sections/SectionMRPE.h | 7 +-
agents/windows/sections/SectionMem.cc | 9 +-
agents/windows/sections/SectionMem.h | 7 +-
agents/windows/sections/SectionOHM.cc | 22 ++--
agents/windows/sections/SectionOHM.h | 9 +-
agents/windows/sections/SectionPS.cc | 28 ++---
agents/windows/sections/SectionPS.h | 7 +-
agents/windows/sections/SectionPerfcounter.cc | 14 +--
agents/windows/sections/SectionPerfcounter.h | 7 +-
agents/windows/sections/SectionPluginGroup.cc | 103 +++++++++++------
agents/windows/sections/SectionPluginGroup.h | 61 +++++++++-
agents/windows/sections/SectionServices.cc | 12 +-
agents/windows/sections/SectionServices.h | 8 +-
agents/windows/sections/SectionSkype.cc | 16 +--
agents/windows/sections/SectionSkype.h | 7 +-
agents/windows/sections/SectionSpool.cc | 23 ++--
agents/windows/sections/SectionSpool.h | 7 +-
agents/windows/sections/SectionSystemtime.cc | 12 +-
agents/windows/sections/SectionSystemtime.h | 8 +-
agents/windows/sections/SectionUptime.cc | 12 +-
agents/windows/sections/SectionUptime.h | 9 +-
agents/windows/sections/SectionWMI.cc | 10 +-
agents/windows/sections/SectionWMI.h | 7 +-
agents/windows/sections/SectionWinperf.cc | 16 +--
agents/windows/sections/SectionWinperf.h | 8 +-
agents/windows/types.h | 52 +--------
agents/windows/wmiHelper.cc | 4 +-
84 files changed, 923 insertions(+), 675 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=793f933774…