Changeset 1226


Ignore:
Timestamp:
Mar 6, 2007, 1:11:14 PM (13 years ago)
Author:
bruno
Message:

Addition of a mr_msg_loglevel function in order to be able to change
the loglevel dynamically (useful for mondoarchive)

Location:
branches/stable/mondo/src
Files:
2 edited

Legend:

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

    r1104 r1226  
    1919extern void mr_msg_init(const char *configfile, int loglevel);
    2020extern void mr_msg_close(void);
     21extern void mr_msg_loglevel(int loglevel);
    2122
    2223/* Internal function bringing debuging info
  • branches/stable/mondo/src/lib/mr_msg.c

    r1134 r1226  
    3232}
    3333
     34/* Function allowing to change loglevel after init */
     35void mr_msg_loglevel(int loglevel) {
     36
     37    mr_loglevel = loglevel;
     38}
     39
    3440/* Initialization function for messages */
    3541void mr_msg_init(const char *logfile, int loglevel) {
     
    4652        fprintf(stderr,"Unable to close %s\n",mr_logfile);
    4753    }
    48     mr_loglevel = loglevel;
     54    mr_msg_loglevel(loglevel);
    4955}
    5056
Note: See TracChangeset for help on using the changeset viewer.