Changeset 340 for cpp


Ignore:
Timestamp:
03/24/15 20:51:28 (9 years ago)
Author:
Maciej Komosinski
Message:

New "pattern" for all messages

Location:
cpp/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/framsg.cpp

    r286 r340  
    88#include "Convert.h"
    99
    10 const char* MSG_LEVEL[]={"DEBUG","INFO","WARN","ERROR","CRITICAL"};
     10const char* MSG_LEVEL[]={"[DEBUG] ","","[WARN] ","[ERROR] ","[CRITICAL] "};
    1111
    1212void FramMessage(const char *o, const char *m, const char *txt, int w)
     
    2929                }
    3030                else //consecutive lines from multi-line
    31                         _FramMessageSingleLine(o, m, ("..." + string(txt, nextsep - txt)).c_str(), w); //could also add line numbers like ...(3)... but let's keep the prefix short and simple
     31                        _FramMessageSingleLine(o, m, (FRAMSG_MULTILINE_CONTINUATION + string(txt, nextsep - txt)).c_str(), w); //could also add line numbers like ...(3)... but let's keep the prefix short and simple
    3232                line++;
    3333                if ((nextsep[0] == '\r') && (nextsep[1] == '\n'))
  • cpp/common/framsg.h

    r339 r340  
    99
    1010extern const char* MSG_LEVEL[];
    11 #define FRAMSG_FORMAT "[%s] %s.%s: %s"
     11#define FRAMSG_FORMAT "%s%s.%s: %s"
     12#define FRAMSG_MULTILINE_CONTINUATION "..."
    1213
    1314void FMprintf(const char *o,const char *m,int w,const char *bl, ...);
Note: See TracChangeset for help on using the changeset viewer.