added: SLog class -- session logger

messages are displayed in the browser (with locales)
changed: MountParser
         now if there is an error in a line -- the line is simply skipped
         


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@741 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-06-19 20:59:58 +00:00
parent b369fda1d9
commit 0a7432b059
35 changed files with 2417 additions and 1671 deletions

View File

@@ -16,17 +16,9 @@
#include <iostream>
#include <string>
#include "textstream.h"
#include "logmanipulators.h"
// log1 - the first level
// log2
// log3
// log4 - the last level (debug level)
// logend - the end of a line
// logendrequest - end of a current request
// logsave - current log buffer is saved and cleared
enum Manipulators { log1, log2, log3, log4, logend, logendrequest, logsave };
class Log
{
@@ -37,7 +29,7 @@ public:
void Init(int log_level_, bool save_each_line_, const std::string & log_file_, bool log_std, int log_max_requests);
void PutDate(Manipulators m);
void PutDate(LogManipulators m);
Log & operator<<(const void * s);
Log & operator<<(const char * s);
Log & operator<<(const std::string * s);
@@ -51,7 +43,7 @@ public:
Log & operator<<(wchar_t s);
Log & operator<<(size_t s);
Log & operator<<(double s);
Log & operator<<(Manipulators m);
Log & operator<<(LogManipulators m);
template<class StringType>
void LogString(const StringType & value, size_t max_size);
@@ -126,6 +118,8 @@ size_t min_size = value.size() < max_size ? value.size() : max_size;
extern Log log;
extern Log nlog;
// for convenience, we have to use only #include "log.h" in the winix
#include "slog.h"
#endif