68 return snprintf(buf, buflen,
"<%c>",
LevelAbbr[level + 3]);
74int log_disp_debug(time_t stamp,
const char *file,
int line,
const char *function,
75 enum LogLevel level,
const char *format, ...)
118 va_start(ap, format);
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_len(const struct Buffer *buf)
Calculate the length of a Buffer.
int buf_vaprintf(struct Buffer *buf, const char *fmt, va_list ap)
Format a string into a Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Convenience wrapper for the debug headers.
bool DebugLogLevel
Prefix log level, e.g. [E].
bool DebugLogColor
Output ANSI colours.
bool DebugLogTimestamp
Show the timestamp.
static int log_level(char *buf, size_t buflen, enum LogLevel level)
Write a log level to a buffer.
static int log_timestamp(char *buf, size_t buflen, time_t time)
Write a timestamp to a buffer.
int log_disp_debug(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Display a log line on screen - Implements log_dispatcher_t -.
LogLevel
Names for the Logging Levels.
@ LL_PERROR
Log perror (using errno).
@ LL_MESSAGE
Log informational message.
@ LL_DEBUG1
Log at debug level 1.
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
Convenience wrapper for the library headers.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
String manipulation buffer.