Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-ws-json1: expose addref/unref functions
[src/app-framework-binder.git]
/
src
/
verbose.c
diff --git
a/src/verbose.c
b/src/verbose.c
index
88183c2
..
2b00907
100644
(file)
--- a/
src/verbose.c
+++ b/
src/verbose.c
@@
-77,6
+77,7
@@
void verbose_set_name(const char *name, int authority)
#else
#include <unistd.h>
#else
#include <unistd.h>
+#include <errno.h>
static const char *appname;
static const char *appname;
@@
-95,11
+96,13
@@
static const char *prefixes[] = {
void vverbose(int level, const char *file, int line, const char *function, const char *fmt, va_list args)
{
void vverbose(int level, const char *file, int line, const char *function, const char *fmt, va_list args)
{
+ int saverr = errno;
int tty = isatty(fileno(stderr));
int tty = isatty(fileno(stderr));
+ errno = saverr;
fprintf(stderr, "%s: ", prefixes[LEVEL(level)] + (tty ? 4 : 0));
vfprintf(stderr, fmt, args);
fprintf(stderr, "%s: ", prefixes[LEVEL(level)] + (tty ? 4 : 0));
vfprintf(stderr, fmt, args);
- if (file != NULL && (!tty || verbosity >
5
))
+ if (file != NULL && (!tty || verbosity >
2
))
fprintf(stderr, " [%s:%d,%s]\n", file, line, function);
else
fprintf(stderr, "\n");
fprintf(stderr, " [%s:%d,%s]\n", file, line, function);
else
fprintf(stderr, "\n");