All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] added outputerr/outputstd log functions
@ 2013-10-08 21:26 Ildar Muslukhov
  2013-10-08 21:26 ` [PATCH 2/6] wired outputstd/err functions Ildar Muslukhov
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Ildar Muslukhov @ 2013-10-08 21:26 UTC (permalink / raw)
  To: trinity; +Cc: davej, Ildar Muslukhov

Signed-off-by: Ildar Muslukhov <ildarm@google.com>

---
 include/log.h |  2 ++
 log.c         | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/include/log.h b/include/log.h
index 2497988..7041eda 100644
--- a/include/log.h
+++ b/include/log.h
@@ -25,6 +25,8 @@
 unsigned int highest_logfile(void);
 void synclogs(void);
 void output(unsigned char level, const char *fmt, ...);
+void outputerr(const char *fmt, ...);
+void outputstd(const char *fmt, ...);
 void open_logfiles(void);
 void close_logfiles(void);
 
diff --git a/log.c b/log.c
index 850a3e2..144567a 100644
--- a/log.c
+++ b/log.c
@@ -221,3 +221,25 @@ void output(unsigned char level, const char *fmt, ...)
 	fprintf(handle, "%s %s", prefix, monobuf);
 	(void)fflush(handle);
 }
+
+/*
+* Used as a way to consolidated all printf calls if someones one to redirect it to somewhere else.
+* note: this function ignores quiet_level since it main purpose is error output.
+*/
+void outputerr(const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vfprintf(stderr, fmt, args);
+	va_end(args);
+}
+
+void outputstd(const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vfprintf(stdout, fmt, args);
+	va_end(args);
+}
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-10-15 17:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 21:26 [PATCH 1/6] added outputerr/outputstd log functions Ildar Muslukhov
2013-10-08 21:26 ` [PATCH 2/6] wired outputstd/err functions Ildar Muslukhov
2013-10-08 21:26 ` [PATCH 3/6] refactored output function Ildar Muslukhov
2013-10-10 18:20   ` Dave Jones
2013-10-15 17:07     ` Ildar Muslukhov
2013-10-08 21:26 ` [PATCH 4/6] wired in output function instead of printf (and some missing outputstd) Ildar Muslukhov
2013-10-09 16:23   ` Dave Jones
2013-10-09 21:40     ` Dave Jones
2013-10-08 21:26 ` [PATCH 5/6] added bufferless logging functions for syscall pamaters Ildar Muslukhov
2013-10-09 16:27   ` Dave Jones
2013-10-08 21:26 ` [PATCH 6/6] wired syscall parameters logging function into syscall (this should fix stack smash bug detected) Ildar Muslukhov
2013-10-09 16:28   ` Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.