Eventscripts: add a debug() function and call ctdb_set_current_debuglevel()
authorMartin Schwenke <martin@meltin.net>
Tue, 16 Aug 2011 23:44:11 +0000 (09:44 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 17 Aug 2011 00:39:35 +0000 (10:39 +1000)
commit6143483d9f87322578c00f12081e381f425226ca
tree9c979c52c4fe1dcf430a9f9a753add28fc850229
parenta7eebc06f81a7b0a3fba93759bcbdeabc8c2e86e
Eventscripts: add a debug() function and call ctdb_set_current_debuglevel()

The debug function passes its arguments to echo if
$CTDB_CURRENT_DEBUGLEVEL is >= 4 (i.e. DEBUG).  If no args are given
then use stdin - this allows the function to be used with here
documents.

To ensure $CTDB_CURRENT_DEBUGLEVEL is set,
ctdb_set_current_debuglevel() is called near the end of the functions
file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions