Navigation


Changeset 965:9b37f34c1b1f in freeDiameter for libfdcore/fdd.y


Ignore:
Timestamp:
Mar 13, 2013, 1:23:37 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Some modifications to logging code:

  • Added a FD_LOG_NOTICE level for the logger function
  • Separated the internal debug levels (NONE, INFO, ...) from the "printlevel" for the logger
  • Renamed TRACE_DEBUG_ERROR to TRACE_ERROR for symetry
  • Renamed TRACE_DEBUG_BUFFER and TRACE_DEBUG_sSA. There take now the printlevel as parameter
  • Added new TRACE_NOTICE, fd_log_notice and fd_log_error macros.
  • sorry if I forgot some changes...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/fdd.y

    r964 r965  
    6363{
    6464        if (ploc->first_line != ploc->last_line) {
    65                 TRACE_DEBUG_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     65                TRACE_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    6666        } else if (ploc->first_column != ploc->last_column) {
    67                 TRACE_DEBUG_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
     67                TRACE_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
    6868        } else {
    69                 TRACE_DEBUG_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
     69                TRACE_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
    7070        }
    7171}
     
    328328                                if (fd == NULL) {
    329329                                        int ret = errno;
    330                                         TRACE_DEBUG_ERROR("WARNING: Unable to open extension file %s for reading: %s\nLD_LIBRARY_PATH will be used.\n", fname, strerror(ret));
     330                                        TRACE_ERROR("WARNING: Unable to open extension file %s for reading: %s\nLD_LIBRARY_PATH will be used.\n", fname, strerror(ret));
    331331                                } else {
    332332                                        fclose(fd);
     
    501501                                if (fd == NULL) {
    502502                                        int ret = errno;
    503                                         TRACE_DEBUG_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
     503                                        TRACE_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
    504504                                        yyerror (&yylloc, conf, "Error on file name");
    505505                                        YYERROR;
     
    509509                                if (fd == NULL) {
    510510                                        int ret = errno;
    511                                         TRACE_DEBUG_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
     511                                        TRACE_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
    512512                                        yyerror (&yylloc, conf, "Error on file name");
    513513                                        YYERROR;
     
    532532                                if (fd == NULL) {
    533533                                        int ret = errno;
    534                                         TRACE_DEBUG_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
     534                                        TRACE_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
    535535                                        yyerror (&yylloc, conf, "Error on file name");
    536536                                        YYERROR;
     
    572572                                if (fd == NULL) {
    573573                                        int ret = errno;
    574                                         TRACE_DEBUG_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
     574                                        TRACE_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
    575575                                        yyerror (&yylloc, conf, "Error on file name");
    576576                                        YYERROR;
     
    615615                                                        &err_pos),
    616616                                                { yyerror (&yylloc, conf, "Error setting Priority parameter.");
    617                                                   TRACE_DEBUG_ERROR("Error at position : %s\n", err_pos);
     617                                                  TRACE_ERROR("Error at position : %s\n", err_pos);
    618618                                                  YYERROR; } );
    619619                        }
     
    632632                                if (fd == NULL) {
    633633                                        int ret = errno;
    634                                         TRACE_DEBUG_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
     634                                        TRACE_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
    635635                                        yyerror (&yylloc, conf, "Error on file name");
    636636                                        YYERROR;
Note: See TracChangeset for help on using the changeset viewer.