Changeset 764c7d1 for log.c


Ignore:
Timestamp:
2008-02-03T21:30:03Z (17 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
3c80a9d
Parents:
b5c8a34
Message:

OTR support, first checkin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • log.c

    rb5c8a34 r764c7d1  
    3030static log_t logoutput;
    3131
    32 static void log_null(int level, char *logmessage);
    33 static void log_irc(int level, char *logmessage);
    34 static void log_syslog(int level, char *logmessage);
    35 static void log_console(int level, char *logmessage);
     32static void log_null(int level, const char *logmessage);
     33static void log_irc(int level, const char *logmessage);
     34static void log_syslog(int level, const char *logmessage);
     35static void log_console(int level, const char *logmessage);
    3636
    3737void log_init(void) {
     
    9797}
    9898
    99 void log_message(int level, char *message, ... ) {
     99void log_message(int level, const char *message, ... ) {
    100100
    101101        va_list ap;
     
    122122}
    123123
    124 void log_error(char *functionname) {
     124void log_error(const char *functionname) {
    125125        log_message(LOGLVL_ERROR, "%s: %s", functionname, strerror(errno));
    126126       
     
    128128}
    129129
    130 static void log_null(int level, char *message) {
     130static void log_null(int level, const char *message) {
    131131        return;
    132132}
    133133
    134 static void log_irc(int level, char *message) {
     134static void log_irc(int level, const char *message) {
    135135        if(level == LOGLVL_ERROR)
    136136                irc_write_all(1, "ERROR :Error: %s", message);
     
    147147}
    148148
    149 static void log_syslog(int level, char *message) {
     149static void log_syslog(int level, const char *message) {
    150150        if(level == LOGLVL_ERROR)
    151151                syslog(LOG_ERR, "%s", message);
     
    161161}
    162162
    163 static void log_console(int level, char *message) {
     163static void log_console(int level, const char *message) {
    164164        if(level == LOGLVL_ERROR)
    165165                fprintf(stderr, "Error: %s\n", message);
Note: See TracChangeset for help on using the changeset viewer.