Changeset 3509 in MondoRescue for branches/3.2/mondo/src/include


Ignore:
Timestamp:
Feb 13, 2016, 2:57:55 AM (5 years ago)
Author:
Bruno Cornec
Message:
  • Change mr_msg_int interface by adding the FUNCTION macro
  • Use mr_msg in mr_system
  • Ability to use that new log system everywhere now
Location:
branches/3.2/mondo/src/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/include/mr_msg.h

    r2208 r3509  
    1616/* functions (public methods) */
    1717
    18 #define mr_msg(x,y,args...) {mr_msg_int(x,__LINE__,__FILE__,y,## args);}
    19 extern void mr_msg_init(const char *configfile, int loglevel);
     18#define mr_msg(lvl,fmt,args...) {mr_msg_int(lvl,__LINE__,__FILE__,__FUNCTION__,fmt,## args);}
     19extern void mr_msg_init(const char *logfile, int loglevel);
    2020extern void mr_msg_close(void);
    2121extern void mr_msg_loglevel(int loglevel);
     
    2323/* Internal function bringing debuging info
    2424 * called indirectly through macros */
    25 extern inline void mr_msg_int(int debug,int line, const char *file, const char *fmt, ...);
     25extern inline void mr_msg_int(int debug, int line, const char *file, const char *function, const char *fmt, ...);
    2626
    2727#endif                          /* MR_MSG_H */
  • branches/3.2/mondo/src/include/mr_sys.h

    r3498 r3509  
    1414#include <stdarg.h>
    1515#include <stdio.h>
    16 
    17 /* functions (public methods) */
    18 
    19 #define mr_system(y,args...) mr_system_int(__LINE__,__FILE__,y,## args)
     16#include "mr_msg.h"
    2017
    2118/* Internal function bringing debuging info
     
    2320extern inline int mr_system_int(int line, char *file, const char *fmt, ...);
    2421
     22/* functions (public methods) */
     23#define mr_system(y,args...) mr_system_int(__LINE__,__FILE__,y,## args)
     24
     25/*  Global variables */
     26
     27extern int mr_loglevel;
     28extern char *mr_logfile;
     29
    2530#endif                          /* MR_SYS_H */
Note: See TracChangeset for help on using the changeset viewer.