Navigation


Changeset 944:6cdb2a54aaf6 in freeDiameter for libfdcore/fdd.l


Ignore:
Timestamp:
Feb 12, 2013, 7:51:10 PM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Log config file errors using the standard logging framework instead of fprintf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/fdd.l

    r740 r944  
    5252        yylloc->first_column = yylloc->last_column + 1;                 \
    5353        yylloc->last_column = yylloc->first_column + yyleng - 1;        \
    54         TRACE_DEBUG(FULL,                                               \
    55                 "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \
     54        TRACE_DEBUG_ERROR("(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n",       \
    5655                yylloc->first_line, yylloc->first_column,               \
    5756                yylloc->last_line, yylloc->last_column,                 \
     
    104103                                if (ret != 1) {
    105104                                        /* No matching: an error occurred */
    106                                         fprintf(stderr, "Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     105                                        TRACE_DEBUG_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
    107106                                        return LEX_ERROR; /* trig an error in yacc parser */
    108107                                        /* Maybe we could REJECT instead of failing here? */
     
    147146        /* Unrecognized character */
    148147<*>.                    {
    149                                 fprintf(stderr, "Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     148                                TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
    150149                                return LEX_ERROR;
    151150                        }
Note: See TracChangeset for help on using the changeset viewer.