Add new eqawarn function and QA loglevel to be used for QA messages
authorMarius Mauch <genone@gentoo.org>
Tue, 9 Jan 2007 01:43:40 +0000 (01:43 -0000)
committerMarius Mauch <genone@gentoo.org>
Tue, 9 Jan 2007 01:43:40 +0000 (01:43 -0000)
svn path=/main/trunk/; revision=5490

bin/isolated-functions.sh
pym/elog_modules/mod_syslog.py

index de62d8611a549b6df13b618da80ca09edbecfcd3..d34af64fa410b97021f4adc6d25d659f32152b73 100644 (file)
@@ -15,7 +15,7 @@ elog_base() {
        local messagetype
        [ -z "${1}" -o -z "${T}" -o ! -d "${T}/logging" ] && return 1
        case "${1}" in
-               INFO|WARN|ERROR|LOG)
+               INFO|WARN|ERROR|LOG|QA)
                        messagetype="${1}"
                        shift
                        ;;
@@ -28,6 +28,12 @@ elog_base() {
        return 0
 }
 
+eqawarn() {
+       elog_base QA "$*"
+       echo -e " ${WARN}*${NORMAL} $*"
+       return 0
+}
+
 elog() {
        elog_base LOG "$*"
        echo -e " ${GOOD}*${NORMAL} $*"
index be8e4f33d28822419574f68cb72f88645c13dd56..a95ecb452e270ac2f94419e7cae0e7b22de13df2 100644 (file)
@@ -7,7 +7,11 @@ def process(mysettings, cpv, logentries, fulltext):
                if not phase in logentries:
                        continue
                for msgtype,msgcontent in logentries[phase]:
-                       pri = {"INFO": syslog.LOG_INFO, "WARN": syslog.LOG_WARNING, "ERROR": syslog.LOG_ERR, "LOG": syslog.LOG_NOTICE}
+                       pri = {"INFO": syslog.LOG_INFO, 
+                               "WARN": syslog.LOG_WARNING, 
+                               "ERROR": syslog.LOG_ERR, 
+                               "LOG": syslog.LOG_NOTICE,
+                               "QA": syslog.LOG_WARNING}
                        msgtext = "".join(msgcontent)
                        syslog.syslog(pri[msgtype], "%s: %s: %s" % (cpv, phase, msgtext))
        syslog.closelog()