summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-03 16:39:33 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-03 16:39:33 +0100
commit92379ba136d863158d06b2ebb31b822779adffec (patch)
tree540d8edfff63bd6ec3bccd3c47f108a693057537 /src/core/libs/lib-ui.sh
parent6bb0e1b842bc3dae69b801112e4cfd39d6947a49 (diff)
logging function + use it instead of abusing notify for less important things
Diffstat (limited to 'src/core/libs/lib-ui.sh')
-rw-r--r--src/core/libs/lib-ui.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh
index ef6ece7..6b8393f 100644
--- a/src/core/libs/lib-ui.sh
+++ b/src/core/libs/lib-ui.sh
@@ -50,6 +50,18 @@ notify ()
}
+# logging of stuff
+log ()
+{
+ if [ "$var_UI_TYPE" = dia ]
+ then
+ echo -e "[LOG] `date +"%Y-%m-%d %H:%M:%S"` $@" >$LOG
+ else
+ echo -e "[LOG] `date +"%Y-%m-%d %H:%M:%S"` $@"
+ fi
+}
+
+
# ask the user a password. return is stored in $PASSWORD or $<TYPE>_PASSWORD
# $1 type (optional. eg 'svn', 'ssh').
ask_password ()