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:
2018-11-21 11:03:53 +00:00
parent a7c47140ae
commit a2ffc1e81c
121 changed files with 7832 additions and 6662 deletions

View File

@@ -19,30 +19,27 @@ init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.h
init.o: ../../../../winix/winixd/core/winix_const.h
init.o: ../../../../winix/winixd/core/logmanipulators.h
init.o: ../../../../winix/winixd/core/slog.h
init.o: ../../../../winix/winixd/core/cur.h
init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.h
init.o: ../../../../winix/winixd/core/config.h
init.o: ../../../../pikotools/space/spaceparser.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../winix/winixd/core/htmlfilter.h
init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/templates/htmltextstream.h
init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../pikotools/space/spacetojson.h
init.o: ../../../../ezc/src/outstreams.h
init.o: ../../../../winix/winixd/core/session.h
init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../winix/winixd/core/rebus.h
init.o: ../../../../winix/winixd/core/ipban.h
init.o: ../../../../winix/winixd/core/mount.h
init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/config.h
init.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/lock.h
init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/error.h
init.o: ../../../../winix/winixd/db/dbitemquery.h
init.o: ../../../../winix/winixd/core/item.h
@@ -50,107 +47,24 @@ init.o: ../../../../winix/winixd/db/dbitemcolumns.h
init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../winix/winixd/core/ugcontainer.h
init.o: ../../../../winix/winixd/core/log.h bot.h stats.h templates.h
init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/system.h
init.o: ../../../../winix/winixd/core/job.h
init.o: ../../../../winix/winixd/core/basethread.h
init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/dirs.h
init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/notify/notify.h
init.o: ../../../../winix/winixd/notify/notifypool.h
init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
init.o: ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h
init.o: ../../../../winix/winixd/notify/templatesnotify.h
init.o: ../../../../winix/winixd/core/users.h
init.o: ../../../../winix/winixd/core/ugcontainer.h
init.o: ../../../../winix/winixd/core/lastcontainer.h
init.o: ../../../../winix/winixd/core/mounts.h
init.o: ../../../../winix/winixd/core/mountparser.h
init.o: ../../../../winix/winixd/core/crypt.h
init.o: ../../../../winix/winixd/core/run.h
init.o: ../../../../winix/winixd/core/users.h
init.o: ../../../../winix/winixd/core/groups.h
init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/loadavg.h
init.o: ../../../../winix/winixd/core/image.h
init.o: ../../../../winix/winixd/core/threadmanager.h
init.o: ../../../../winix/winixd/core/timezones.h
init.o: ../../../../winix/winixd/core/timezone.h
init.o: ../../../../winix/winixd/core/sessionmanager.h
init.o: ../../../../winix/winixd/core/sessioncontainer.h
init.o: ../../../../winix/winixd/core/ipbancontainer.h
init.o: ../../../../winix/winixd/core/sessionidmanager.h
init.o: ../../../../tito/src/base64.h ../../../../tito/src/aes.h
init.o: ../../../../winix/winixd/functions/functions.h
init.o: ../../../../winix/winixd/functions/functionbase.h
init.o: ../../../../winix/winixd/core/system.h
init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/functions/functionparser.h
init.o: ../../../../winix/winixd/core/cur.h
init.o: ../../../../winix/winixd/functions/account.h
init.o: ../../../../winix/winixd/functions/adduser.h
init.o: ../../../../winix/winixd/functions/cat.h
init.o: ../../../../winix/winixd/functions/chmod.h
init.o: ../../../../winix/winixd/functions/privchanger.h
init.o: ../../../../winix/winixd/functions/chown.h
init.o: ../../../../winix/winixd/functions/ckeditor.h
init.o: ../../../../winix/winixd/functions/cp.h
init.o: ../../../../winix/winixd/functions/default.h
init.o: ../../../../winix/winixd/functions/download.h
init.o: ../../../../winix/winixd/functions/emacs.h
init.o: ../../../../winix/winixd/functions/env.h
init.o: ../../../../winix/winixd/functions/imgcrop.h
init.o: ../../../../winix/winixd/functions/last.h
init.o: ../../../../winix/winixd/functions/login.h
init.o: ../../../../winix/winixd/functions/logout.h
init.o: ../../../../winix/winixd/functions/ln.h
init.o: ../../../../winix/winixd/functions/ls.h
init.o: ../../../../winix/winixd/functions/man.h
init.o: ../../../../winix/winixd/functions/meta.h
init.o: ../../../../winix/winixd/functions/mkdir.h
init.o: ../../../../winix/winixd/functions/mv.h
init.o: ../../../../winix/winixd/functions/nicedit.h
init.o: ../../../../winix/winixd/functions/node.h
init.o: ../../../../winix/winixd/functions/passwd.h
init.o: ../../../../winix/winixd/functions/priv.h
init.o: ../../../../winix/winixd/functions/pw.h
init.o: ../../../../winix/winixd/functions/reload.h
init.o: ../../../../winix/winixd/functions/rm.h
init.o: ../../../../winix/winixd/functions/rmuser.h
init.o: ../../../../winix/winixd/functions/sort.h
init.o: ../../../../winix/winixd/functions/specialdefault.h
init.o: ../../../../winix/winixd/functions/stat.h
init.o: ../../../../winix/winixd/functions/subject.h
init.o: ../../../../winix/winixd/functions/template.h
init.o: ../../../../winix/winixd/functions/tinymce.h
init.o: ../../../../winix/winixd/functions/uname.h
init.o: ../../../../winix/winixd/functions/upload.h
init.o: ../../../../winix/winixd/functions/uptime.h
init.o: ../../../../winix/winixd/functions/who.h
init.o: ../../../../winix/winixd/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h
init.o: ../../../../winix/winixd/templates/templates.h
init.o: ../../../../winix/winixd/templates/patterncacher.h
init.o: ../../../../winix/winixd/templates/indexpatterns.h
init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/changepatterns.h
init.o: ../../../../winix/winixd/templates/htmltextstream.h
init.o: ../../../../winix/winixd/core/sessionmanager.h statssession.h
init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/session.h
init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../winix/winixd/core/rebus.h
init.o: ../../../../winix/winixd/core/ipban.h
init.o: ../../../../winix/winixd/core/mount.h bot.h stats.h
init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h templates.h
init.o: ../../../../winix/winixd/core/plugin.h statssession.h
init.o: ../../../../winix/winixd/core/plugindata.h
stats.o: stats.h ../../../../winix/winixd/core/config.h
stats.o: ../../../../winix/winixd/core/winixmodel.h
stats.o: ../../../../winix/winixd/core/winixbase.h
stats.o: ../../../../winix/winixd/core/log.h
stats.o: ../../../../winix/winixd/core/textstream.h
stats.o: ../../../../winix/winixd/core/misc.h
@@ -169,36 +83,19 @@ stats.o: ../../../../pikotools/textstream/types.h
stats.o: ../../../../pikotools/utf8/utf8.h
stats.o: ../../../../winix/winixd/core/winix_const.h
stats.o: ../../../../winix/winixd/core/logmanipulators.h
stats.o: ../../../../winix/winixd/core/slog.h
stats.o: ../../../../winix/winixd/core/cur.h
stats.o: ../../../../winix/winixd/core/request.h
stats.o: ../../../../winix/winixd/core/error.h
stats.o: ../../../../winix/winixd/core/config.h
stats.o: ../../../../pikotools/space/spaceparser.h
stats.o: ../../../../pikotools/space/space.h
stats.o: ../../../../winix/winixd/core/htmlfilter.h
stats.o: ../../../../winix/winixd/templates/htmltextstream.h
stats.o: ../../../../winix/winixd/core/textstream.h
stats.o: ../../../../pikotools/space/spacetojson.h
stats.o: ../../../../ezc/src/outstreams.h
stats.o: ../../../../winix/winixd/core/session.h
stats.o: ../../../../winix/winixd/core/user.h
stats.o: ../../../../winix/winixd/core/filelog.h
stats.o: ../../../../winix/winixd/core/synchro.h
stats.o: ../../../../winix/winixd/core/filelog.h
stats.o: ../../../../winix/winixd/core/lock.h
stats.o: ../../../../winix/winixd/core/synchro.h
stats.o: ../../../../winix/winixd/core/plugin.h
stats.o: ../../../../winix/winixd/core/pluginmsg.h
stats.o: ../../../../winix/winixd/core/plugindata.h
stats.o: ../../../../winix/winixd/core/rebus.h
stats.o: ../../../../winix/winixd/core/ipban.h
stats.o: ../../../../winix/winixd/core/mount.h
stats.o: ../../../../winix/winixd/templates/locale.h
stats.o: ../../../../winix/winixd/core/winixbase.h
templates.o: templates.h ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/log.h
templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../pikotools/space/spaceparser.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../winix/winixd/core/htmlfilter.h
templates.o: ../../../../winix/winixd/core/request.h
templates.o: ../../../../winix/winixd/core/requesttypes.h
templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/date/date.h
@@ -207,132 +104,37 @@ templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../pikotools/convert/strtoint.h
templates.o: ../../../../pikotools/convert/text.h
templates.o: ../../../../winix/winixd/core/misc.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../winix/winixd/core/winix_const.h
templates.o: ../../../../winix/winixd/core/requesttypes.h
templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../winix/winixd/core/error.h
templates.o: ../../../../winix/winixd/core/textstream.h
templates.o: ../../../../winix/winixd/templates/htmltextstream.h
templates.o: ../../../../winix/winixd/core/textstream.h
templates.o: ../../../../pikotools/space/spacetojson.h
templates.o: ../../../../ezc/src/outstreams.h
templates.o: ../../../../winix/winixd/core/system.h
templates.o: ../../../../winix/winixd/core/job.h
templates.o: ../../../../winix/winixd/core/basethread.h
templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/dirs.h
templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/db/db.h
templates.o: ../../../../winix/winixd/db/dbbase.h
templates.o: ../../../../winix/winixd/db/dbconn.h
templates.o: ../../../../winix/winixd/db/dbtextstream.h
templates.o: ../../../../winix/winixd/core/error.h
templates.o: ../../../../winix/winixd/db/dbitemquery.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/db/dbitemcolumns.h
templates.o: ../../../../winix/winixd/core/user.h
templates.o: ../../../../winix/winixd/core/group.h
templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/core/ugcontainer.h
templates.o: ../../../../winix/winixd/notify/notify.h
templates.o: ../../../../winix/winixd/notify/notifypool.h
templates.o: ../../../../winix/winixd/templates/locale.h
templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/locale.h
templates.o: ../../../../winix/winixd/templates/localefilter.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
templates.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
templates.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../winix/winixd/core/winix_const.h
templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
templates.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/outstreams.h
templates.o: ../../../../ezc/src/expressionparser.h
templates.o: ../../../../ezc/src/patternparser.h
templates.o: ../../../../winix/winixd/notify/notifythread.h
templates.o: ../../../../winix/winixd/core/basethread.h
templates.o: ../../../../winix/winixd/notify/templatesnotify.h
templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../winix/winixd/core/users.h
templates.o: ../../../../winix/winixd/core/user.h
templates.o: ../../../../winix/winixd/core/ugcontainer.h
templates.o: ../../../../winix/winixd/core/lastcontainer.h
templates.o: ../../../../winix/winixd/core/cur.h
templates.o: ../../../../winix/winixd/core/session.h
templates.o: ../../../../winix/winixd/core/rebus.h
templates.o: ../../../../winix/winixd/core/ipban.h
templates.o: ../../../../winix/winixd/core/mount.h
templates.o: ../../../../winix/winixd/core/mounts.h
templates.o: ../../../../winix/winixd/core/mountparser.h
templates.o: ../../../../winix/winixd/core/crypt.h
templates.o: ../../../../winix/winixd/core/run.h
templates.o: ../../../../winix/winixd/core/users.h
templates.o: ../../../../winix/winixd/core/groups.h
templates.o: ../../../../winix/winixd/core/group.h
templates.o: ../../../../winix/winixd/core/loadavg.h
templates.o: ../../../../winix/winixd/core/image.h
templates.o: ../../../../winix/winixd/core/threadmanager.h
templates.o: ../../../../winix/winixd/core/timezones.h
templates.o: ../../../../winix/winixd/core/timezone.h
templates.o: ../../../../winix/winixd/core/sessionmanager.h
templates.o: ../../../../winix/winixd/core/sessioncontainer.h
templates.o: ../../../../winix/winixd/core/ipbancontainer.h
templates.o: ../../../../winix/winixd/core/sessionidmanager.h
templates.o: ../../../../tito/src/base64.h ../../../../tito/src/aes.h
templates.o: ../../../../winix/winixd/functions/functions.h
templates.o: ../../../../winix/winixd/functions/functionbase.h
templates.o: ../../../../winix/winixd/core/request.h
templates.o: ../../../../winix/winixd/core/system.h
templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/functions/functionparser.h
templates.o: ../../../../winix/winixd/core/cur.h
templates.o: ../../../../winix/winixd/functions/account.h
templates.o: ../../../../winix/winixd/functions/adduser.h
templates.o: ../../../../winix/winixd/functions/cat.h
templates.o: ../../../../winix/winixd/functions/chmod.h
templates.o: ../../../../winix/winixd/functions/privchanger.h
templates.o: ../../../../winix/winixd/functions/chown.h
templates.o: ../../../../winix/winixd/functions/ckeditor.h
templates.o: ../../../../winix/winixd/functions/cp.h
templates.o: ../../../../winix/winixd/functions/default.h
templates.o: ../../../../winix/winixd/functions/download.h
templates.o: ../../../../winix/winixd/functions/emacs.h
templates.o: ../../../../winix/winixd/functions/env.h
templates.o: ../../../../winix/winixd/functions/imgcrop.h
templates.o: ../../../../winix/winixd/functions/last.h
templates.o: ../../../../winix/winixd/functions/login.h
templates.o: ../../../../winix/winixd/functions/logout.h
templates.o: ../../../../winix/winixd/functions/ln.h
templates.o: ../../../../winix/winixd/functions/ls.h
templates.o: ../../../../winix/winixd/functions/man.h
templates.o: ../../../../winix/winixd/functions/meta.h
templates.o: ../../../../winix/winixd/functions/mkdir.h
templates.o: ../../../../winix/winixd/functions/mv.h
templates.o: ../../../../winix/winixd/functions/nicedit.h
templates.o: ../../../../winix/winixd/functions/node.h
templates.o: ../../../../winix/winixd/functions/passwd.h
templates.o: ../../../../winix/winixd/functions/priv.h
templates.o: ../../../../winix/winixd/functions/pw.h
templates.o: ../../../../winix/winixd/functions/reload.h
templates.o: ../../../../winix/winixd/functions/rm.h
templates.o: ../../../../winix/winixd/functions/rmuser.h
templates.o: ../../../../winix/winixd/functions/sort.h
templates.o: ../../../../winix/winixd/functions/specialdefault.h
templates.o: ../../../../winix/winixd/functions/stat.h
templates.o: ../../../../winix/winixd/functions/subject.h
templates.o: ../../../../winix/winixd/functions/template.h
templates.o: ../../../../winix/winixd/functions/tinymce.h
templates.o: ../../../../winix/winixd/functions/uname.h
templates.o: ../../../../winix/winixd/functions/upload.h
templates.o: ../../../../winix/winixd/functions/uptime.h
templates.o: ../../../../winix/winixd/functions/who.h
templates.o: ../../../../winix/winixd/functions/vim.h
templates.o: ../../../../winix/winixd/core/htmlfilter.h
templates.o: ../../../../winix/winixd/templates/templates.h
templates.o: ../../../../winix/winixd/templates/patterncacher.h
templates.o: ../../../../winix/winixd/templates/indexpatterns.h
templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/changepatterns.h
templates.o: ../../../../winix/winixd/templates/htmltextstream.h
templates.o: ../../../../winix/winixd/core/sessionmanager.h
templates.o: ../../../../winix/winixd/core/misc.h stats.h
templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../winix/winixd/core/winixmodel.h
templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/core/log.h
templates.o: ../../../../winix/winixd/core/textstream.h
templates.o: ../../../../winix/winixd/core/logmanipulators.h
templates.o: ../../../../winix/winixd/core/filelog.h
templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/filelog.h
templates.o: ../../../../winix/winixd/core/lock.h
templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/templates/misc.h
templates.o: ../../../../winix/winixd/templates/localefilter.h
templates.o: ../../../../winix/winixd/templates/locale.h
templates.o: ../../../../pikotools/space/spaceparser.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../winix/winixd/templates/htmltextstream.h
templates.o: ../../../../winix/winixd/core/textstream.h

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* Copyright (c) 2010-2018, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,7 @@
#include "core/request.h"
#include "core/config.h"
#include "db/db.h"
#include "core/cur.h"
#include "bot.h"
#include "stats.h"
@@ -151,11 +152,11 @@ StatsSession * stats_session = 0;
void SessionCreated(PluginInfo & info)
{
StatsSession * d = new StatsSession();
info.session->plugin_data.Assign(d);
info.session->plugin_data.Assign(info.plugin->current_plugin, d);
if( !info.cur->request->IsParam(nostat_param) )
{
log << log4 << "Stats: created stats plugin data"
info.log << log4 << "Stats: created stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << d << logend;
}
@@ -169,7 +170,7 @@ void RemoveSession(PluginInfo & info)
{
// temporarily for debug
// sometimes the pointer is null here
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!, ses_id: " << info.session->id << logend;
info.log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!, ses_id: " << info.session->id << logend;
return;
}
@@ -179,7 +180,7 @@ void RemoveSession(PluginInfo & info)
if( !d->nostat )
{
log << log4 << "Stats: deleting stats plugin data"
info.log << log4 << "Stats: deleting stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << info.plugin_data_base << logend;
}
@@ -225,14 +226,15 @@ void Init(PluginInfo & info)
{
using namespace Stats;
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, CreateFunctions);
plugin.Assign(WINIX_CONTENT_MAKE, ContentMake);
plugin.Assign(WINIX_SESSION_CREATED, SessionCreated);
plugin.Assign(WINIX_PLUGIN_SESSION_DATA_REMOVE, RemoveSession);
plugin.Assign(WINIX_CLOSE, Close);
plugin.Assign(WINIX_FILE_REMOVED, RemoveFile);
plugin.Assign(WINIX_DIR_PREPARE_TO_REMOVE, RemoveDir);
info.plugin->Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, CreateFunctions);
info.plugin->Assign(WINIX_CONTENT_MAKE, ContentMake);
info.plugin->Assign(WINIX_SESSION_CREATED, SessionCreated);
info.plugin->Assign(WINIX_PLUGIN_SESSION_DATA_REMOVE, RemoveSession);
info.plugin->Assign(WINIX_CLOSE, Close);
info.plugin->Assign(WINIX_FILE_REMOVED, RemoveFile);
info.plugin->Assign(WINIX_DIR_PREPARE_TO_REMOVE, RemoveDir);
stats.set_dependency(reinterpret_cast<WinixModel*>(info.winix_system));
stats.ReadConfig(info.config);
stats.ReadStats();

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* Copyright (c) 2010-2018, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,6 +39,8 @@
#include <map>
#include <fstream>
#include "core/config.h"
#include "core/winixmodel.h"
namespace Winix
{
@@ -48,7 +50,7 @@ namespace Stats
struct Stats
struct Stats : public WinixModel
{
Stats();