parent
01a81c2c6d
commit
9c0b304a53
1 changed files with 5 additions and 8 deletions
|
@ -131,12 +131,6 @@ private:
|
|||
lua_kernel_base & L_;
|
||||
std::stringstream log_;
|
||||
|
||||
// Lua kernel sends log strings to this function
|
||||
// This is arranged by set_external_log call
|
||||
void log_function(const std::string & str) {
|
||||
log_ << font::escape_text(str);
|
||||
}
|
||||
|
||||
public:
|
||||
lua_model (lua_kernel_base & lk)
|
||||
: L_(lk)
|
||||
|
@ -144,8 +138,11 @@ public:
|
|||
{
|
||||
DBG_LUA << "constructing a lua_interpreter::model\n";
|
||||
//DBG_LUA << "incoming:\n" << lk.get_log().rdbuf() << "\n.\n";
|
||||
log_ << lk.get_log().str() << std::flush;
|
||||
L_.set_external_log([this](const std::string & str) { this->log_function(str); }); //register our log to get commands and output from the lua interpreter
|
||||
log_ << font::escape_text(lk.get_log().str()) << std::flush;
|
||||
// Lua kernel sends log strings to this function
|
||||
L_.set_external_log([this](const std::string & str) {
|
||||
log_ << font::escape_text(str);
|
||||
});
|
||||
//DBG_LUA << "received:\n" << log_.str() << "\n.\n";
|
||||
|
||||
DBG_LUA << "finished constructing a lua_interpreter::model\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue