diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-03 16:39:33 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-03 16:39:33 +0100 |
commit | 92379ba136d863158d06b2ebb31b822779adffec (patch) | |
tree | 540d8edfff63bd6ec3bccd3c47f108a693057537 /src/core/libs | |
parent | 6bb0e1b842bc3dae69b801112e4cfd39d6947a49 (diff) |
logging function + use it instead of abusing notify for less important things
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-ui.sh | 12 |
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 () |