Remove unused log functions.

This commit is contained in:
Nicholas Marriott 2014-03-07 15:49:09 +00:00
parent 683ca270d4
commit ebe7bd7c8b
2 changed files with 1 additions and 43 deletions

41
log.c
View File

@ -41,7 +41,7 @@ __dead void log_vfatal(const char *, va_list);
void
log_event_cb(unused int severity, const char *msg)
{
log_warnx("%s", msg);
log_debug("%s", msg);
}
/* Open logging to file. */
@ -86,45 +86,6 @@ log_vwrite(const char *msg, va_list ap)
free(fmt);
}
/* Log a warning with error string. */
void printflike1
log_warn(const char *msg, ...)
{
va_list ap;
char *fmt;
va_start(ap, msg);
if (asprintf(&fmt, "%s: %s", msg, strerror(errno)) == -1)
exit(1);
log_vwrite(fmt, ap);
free(fmt);
va_end(ap);
}
/* Log a warning. */
void printflike1
log_warnx(const char *msg, ...)
{
va_list ap;
va_start(ap, msg);
log_vwrite(msg, ap);
va_end(ap);
}
/* Log an informational message. */
void printflike1
log_info(const char *msg, ...)
{
va_list ap;
if (log_level > -1) {
va_start(ap, msg);
log_vwrite(msg, ap);
va_end(ap);
}
}
/* Log a debug message. */
void printflike1
log_debug(const char *msg, ...)

3
tmux.h
View File

@ -2342,9 +2342,6 @@ struct event_base *osdep_event_init(void);
/* log.c */
void log_open(int, const char *);
void log_close(void);
void printflike1 log_warn(const char *, ...);
void printflike1 log_warnx(const char *, ...);
void printflike1 log_info(const char *, ...);
void printflike1 log_debug(const char *, ...);
void printflike1 log_debug2(const char *, ...);
__dead void printflike1 log_fatal(const char *, ...);