n3npq commented on this pull request.
> @@ -237,6 +237,89 @@ const char * rpmlogLevelPrefix(rpmlogLvl pri)
return prefix;
}
+static const char * rpmlogLevelColor(rpmlogLvl pri)
+{
+ return rpmlogMsgPrefixColor[pri&0x7];
+}
+
+static int rpmlogDefault(FILE *stdlog, rpmlogRec rec)
+{
+ static const char fubar[] =
+ "Error occurred during writing of a log message";
+ FILE *msgout = (stdlog ? stdlog : stderr);
+ const char * colorOn = isatty(fileno(msgout))
RPM output is often useless in a pager because of inconsistent usage between
stdout/stderr while logging. Complicated operations (-Uvh, -ba) that run many
scripts cannot colorize without applying patterns using sed.
So adding a --color=WHEN option (instead of a simple colorization of the the
log prefix) is likely not worth the effort.
BTW, adding comments after C statements, not in the midst of a statement,
provides better context. The snippet above appears to be coercing an integer
return into a const char * pointer.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/225#discussion_r119872437
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint