This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/2536] New: standardized formatting of warnings and errors


It would be nice if there were a reliable way to grep for errors in the output of make.  But this is 
unachievable today because every tool that make runs has its own style of reporting errors and 
warnings.  There should be a standard way.

I propose a new library function:
  #define TROUBLE_ERROR "error: "
  #define TROUBLE_WARNING "warning: "
  extern char* trouble(char* trouble, char* message);
If a TROUBLE_STANDARD environment variable is present, the returned string is prepended with the 
first argument. Otherwise, the returned string is the same as the given message.

If the TROUBLE_PREFIXES environment variable is present, it can replace default prefixes as desired.  For 
example:
  export TROUBLE_PREFIXES='~error:~***ERROR: ~warning: ~*WARNING: ~'
where ~ can be any character a la sed replacement.

All gnu commands should be updated to use the new mechanism. In case legacy software is going to 
look at the output, and the software requires the exact previous error syntax, full backward 
compatibility is retained by not defining the TROUBLE_STANDARD environment variable.

-- 
           Summary: standardized formatting of warnings and errors
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: Dave at Yost dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2536

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]