diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-01 00:14:51 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-01 00:14:51 +0000 |
commit | 05f71c98af1bc9d9aabf3e8e3dc78cae75675e1c (patch) | |
tree | 921b18da0dc52e7562f0c6a02e5343f9b582cf64 /src/log.h | |
parent | 78c72d1463735ad6e3a176f89d3c41a5ed71fc40 (diff) | |
download | mana-05f71c98af1bc9d9aabf3e8e3dc78cae75675e1c.tar.gz mana-05f71c98af1bc9d9aabf3e8e3dc78cae75675e1c.tar.bz2 mana-05f71c98af1bc9d9aabf3e8e3dc78cae75675e1c.tar.xz mana-05f71c98af1bc9d9aabf3e8e3dc78cae75675e1c.zip |
* The client will now only attempt to load .tmx or .tmx.gz files.
* When unable to connect to char server, report IP to which it can't connect.
* Cleaned up logger a bit.
Diffstat (limited to 'src/log.h')
-rw-r--r-- | src/log.h | 53 |
1 files changed, 24 insertions, 29 deletions
@@ -23,7 +23,6 @@ #define _LOG_H #include <stdlib.h> -#include <stdio.h> #include <stdarg.h> #include <time.h> #include <string> @@ -35,34 +34,30 @@ */ class Logger { -public: - -/** - * Constructor : - * Initializes log file by opening it for writing. - */ -Logger(std::string logFilename); - -/** - * Destructor - */ -~Logger(); - -/** - * Enters a message in the log. The message will be timestamped. - */ -void log(const char *log_text, ...); - -/** - * Log an error and quit. The error will pop-up in Windows and will be printed - * to standard error everywhere else. - */ -void error(const std::string &error_text); - -private: - -std::ofstream logFile; - + public: + /** + * Constructor, opens log file for writing. + */ + Logger(const std::string &logFilename); + + /** + * Destructor, closes log file. + */ + ~Logger(); + + /** + * Enters a message in the log. The message will be timestamped. + */ + void log(const char *log_text, ...); + + /** + * Log an error and quit. The error will pop-up in Windows and will be + * printed to standard error everywhere else. + */ + void error(const std::string &error_text); + + private: + std::ofstream logFile; }; #endif |