start working on 0.7.x branch
- added FileLog which stores content to the file log - now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog - new base classes: WinixBase (Log, Config*, Synchro*) WinixModel : public WinixBase (morm::ModelConnector*, Plugin*) WinixSystem : public WinixModel (System*) WinixRequest : public WinixSystem (SLog, Cur*) - singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel) - DbBase, DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer) each thread will have its own ModelConnector git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -45,11 +45,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcgiapp.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "mounts.h"
|
||||
#include "request.h"
|
||||
#include "synchro.h"
|
||||
#include "sessionmanager.h"
|
||||
#include "db/db.h"
|
||||
#include "functions/functions.h"
|
||||
@@ -61,6 +56,10 @@
|
||||
#include "acceptencodingparser.h"
|
||||
#include "space/jsontospaceparser.h"
|
||||
|
||||
#include "winixrequest.h"
|
||||
#include "logger/logger.h"
|
||||
#include "filelog.h"
|
||||
|
||||
|
||||
namespace Winix
|
||||
{
|
||||
@@ -76,6 +75,8 @@ public:
|
||||
|
||||
bool InitFCGI();
|
||||
bool DropPrivileges();
|
||||
void InitFileLog();
|
||||
void InitPlugins();
|
||||
bool Init();
|
||||
void Start();
|
||||
void Close();
|
||||
@@ -101,7 +102,7 @@ public:
|
||||
// users sessions
|
||||
SessionManager session_manager;
|
||||
|
||||
// database
|
||||
// database (DEPRACATED)
|
||||
Db db;
|
||||
DbConn db_conn;
|
||||
|
||||
@@ -129,6 +130,11 @@ public:
|
||||
Templates templates;
|
||||
|
||||
|
||||
|
||||
FileLog file_log;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
enum Header
|
||||
@@ -162,6 +168,27 @@ private:
|
||||
std::wstring http_header;
|
||||
std::string http_header_8bit;
|
||||
|
||||
PT::Logger logger; // temporarily
|
||||
morm::ModelConnector model_connector; // main thread model connector, each thread has its own connector
|
||||
morm::JSONConnector json_connector;
|
||||
morm::PostgreSQLConnector postgresql_connector;
|
||||
|
||||
// objects for main thread
|
||||
WinixBase winix_base;
|
||||
WinixModel winix_model;
|
||||
WinixSystem winix_system;
|
||||
WinixRequest winix_request;
|
||||
// ///////////////////////
|
||||
|
||||
Plugin plugin;
|
||||
|
||||
//////////////////////////
|
||||
|
||||
// log_buffer for the main thread
|
||||
TextStream<std::wstring> log_buffer;
|
||||
|
||||
// logger only for App object
|
||||
Log log;
|
||||
|
||||
bool InitFCGI(char * sock, char * sock_user, char * sock_group);
|
||||
bool InitFCGIChmodChownSocket(char * sock, char * sock_user, char * sock_group);
|
||||
|
||||
Reference in New Issue
Block a user