logging to a variable FEISTY_MEOW_EVENT_LOG, supported by a method called log_feisty_meow_event, this fascinating new feature provides an event log we could have handily implemented 20 years ago. but it's still useful and needed now.
also pushed the fred stats down deeper into personal fred territory in the cloud.
# these metrics are how bogged down we are in to-do type items.
-REPORT_FILE="$HOME/cloud/fred_stats/overload_history.txt"
+# logged historical file where we append our latest report.
+REPORT_FILE="$HOME/cloud/magic_cabinet/fred/task_stats/overload_history.txt"
# given a path, this will find how many items are under it, ignoring svn and git files, plus
# other patterns we happen to notice are not useful.
function exit_on_error()
{
if [ $? -ne 0 ]; then
- echo -e "\n\naction failed: $*\n\n*** Exiting script..."
+ echo -e "\n\nan important action failed and this script will stop:\n\n$*\n\n*** Exiting script..."
error_sound
exit 1
fi
function continue_on_error()
{
if [ $? -ne 0 ]; then
- echo -e "\n\nerror occurred: $*\n\n=> Continuing script..."
+ echo -e "\n\na problem occurred, but we can continue:\n\n$*\n\n=> Continuing script..."
error_sound
fi
}
##############
+ # accepts any number of arguments and outputs them to the feisty meow event log.
+ function log_feisty_meow_event()
+ {
+ echo -e "$(date_stringer) -- $(basename $0):\t\t$*" >> "$FEISTY_MEOW_EVENT_LOG"
+ }
+
+ ##############
+
# wraps secure shell with some parameters we like, most importantly to enable X forwarding.
function ssh()
{
define_yeti_variable TMP=$HOME/.tmp
fi
+ # set up our event logging file for any notable situation to be recorded in.
+ if [ -z "$FEISTY_MEOW_EVENT_LOG" ]; then
+ define_yeti_variable FEISTY_MEOW_EVENT_LOG="$TMP/zz_feisty_meow_events.log"
+ fi
+
# set up the top-level for all build creations and logs and such.
if [ -z "$FEISTY_MEOW_GENERATED_STORE" ]; then
define_yeti_variable FEISTY_MEOW_GENERATED_STORE="$TMP/generated-feisty_meow"