diff --git a/winixd/templates/templates.cpp b/winixd/templates/templates.cpp index bebcd68..cdb7f18 100644 --- a/winixd/templates/templates.cpp +++ b/winixd/templates/templates.cpp @@ -1009,14 +1009,7 @@ using namespace TemplatesFunctions; generator.UseMainStream(cur->request->send_main_stream); generator.Generate(cur->request->out_main_stream, cur->request->out_streams); - // for debug purposes: - // log << log4 << "Templates: main stream size: " << cur->request->out_main_stream.size() << logend; - // log << log4 << "Templates: produced frames: " << logend; - - // for(auto i=cur->request->out_streams.streams_map.begin() ; i != cur->request->out_streams.streams_map.end() ; ++i) - // { - // log << log4 << " frame name: " << i->first << ", size: " << i->second->size() << logend; - // } + LogProducedFrames(); } else { @@ -1025,6 +1018,33 @@ using namespace TemplatesFunctions; } +void Templates::LogProducedFrames() +{ + if( !cur->request->out_main_stream.empty() ) + { + log << log3 << "Templates: main stream size: " << cur->request->out_main_stream.size() << logend; + } + + if( !cur->request->out_streams.streams_map.empty() ) + { + log << log3 << "Templates: frames: "; + bool is_first = true; + + for(auto i=cur->request->out_streams.streams_map.begin() ; i != cur->request->out_streams.streams_map.end() ; ++i) + { + if( !is_first ) + { + log << ", "; + } + + log << i->first << " (size: " << i->second->size() << ")"; + is_first = false; + } + + log << logend; + } +} + void Templates::SetConfig(Config * pconfig) { diff --git a/winixd/templates/templates.h b/winixd/templates/templates.h index 8454d42..f23e551 100644 --- a/winixd/templates/templates.h +++ b/winixd/templates/templates.h @@ -593,6 +593,8 @@ private: void ReadLocale(); void SetHtmlFilter(); void CreateFunctions(); // should be called before reading patterns (patterns will cache ezc functions) + void LogProducedFrames(); + Ezc::Pattern * SelectIndexPattern(const std::wstring & template_name); Ezc::Pattern * SelectIndexPattern();