netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer/src/Lib Log.cpp Log.hpp


From: Ivo Danihelka
Subject: [netPanzer-CVS] netpanzer/src/Lib Log.cpp Log.hpp
Date: Mon, 15 Sep 2003 18:27:44 -0400

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Ivo Danihelka <address@hidden>  03/09/15 18:27:43

Modified files:
        src/Lib        : Log.cpp Log.hpp 

Log message:
        Args checking LOG

Patches:
Index: netpanzer/src/Lib/Log.cpp
diff -u netpanzer/src/Lib/Log.cpp:1.2 netpanzer/src/Lib/Log.cpp:1.3
--- netpanzer/src/Lib/Log.cpp:1.2       Sat Sep  6 18:31:20 2003
+++ netpanzer/src/Lib/Log.cpp   Mon Sep 15 18:27:43 2003
@@ -47,7 +47,7 @@
        vsnprintf(buf, sizeof(buf), msg, args);
        va_end(args);
 
-       printf("%s\n", buf);
+       fprintf(stderr, "%s\n", buf);
        *logfile << buf << "\n";
 }
 
Index: netpanzer/src/Lib/Log.hpp
diff -u netpanzer/src/Lib/Log.hpp:1.2 netpanzer/src/Lib/Log.hpp:1.3
--- netpanzer/src/Lib/Log.hpp:1.2       Sat Sep  6 18:31:20 2003
+++ netpanzer/src/Lib/Log.hpp   Mon Sep 15 18:27:43 2003
@@ -18,6 +18,7 @@
 #ifndef __LIB_LOG_HPP__
 #define __LIB_LOG_HPP__
 
+#include <config.h>
 #include <fstream>
 
 class Logger
@@ -26,7 +27,8 @@
        Logger();
        ~Logger();
        
-       void log(const char* msg, ...);
+       void log(const char* msg, ...)
+               __attribute__((format (__printf__, 2, 3)));
 
 private:
        std::ofstream* logfile;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]