From b2a4f10c2292255f28ce607d670be912687b5787 Mon Sep 17 00:00:00 2001 From: myk002 Date: Wed, 3 Aug 2022 21:43:07 -0700 Subject: [PATCH] output onupdate log messages by default but include info on how to make it stop --- plugins/examples/skeleton.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/examples/skeleton.cpp b/plugins/examples/skeleton.cpp index e8553bdd6..539d84b1a 100644 --- a/plugins/examples/skeleton.cpp +++ b/plugins/examples/skeleton.cpp @@ -50,8 +50,8 @@ REQUIRE_GLOBAL(world); namespace DFHack { // for configuration-related logging DBG_DECLARE(skeleton, status, DebugCategory::LDEBUG); - // run `debugfilter set debug skeleton onupdate` to see logging in plugin_onupdate - DBG_DECLARE(skeleton, onupdate, DebugCategory::LINFO); + // for plugin_onupdate logging + DBG_DECLARE(skeleton, onupdate, DebugCategory::LDEBUG); // for command-related logging DBG_DECLARE(skeleton, command, DebugCategory::LDEBUG); } @@ -138,7 +138,9 @@ DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_chan // Note that if the plugin implements the enabled API, this function is only called // if the plugin is enabled. DFhackCExport command_result plugin_onupdate (color_ostream &out) { - DEBUG(onupdate,out).print("onupdate called\n"); + DEBUG(onupdate,out).print( + "onupdate called (run 'debugfilter set info skeleton onupdate' to stop" + " seeing these messages)\n"); return CR_OK; }