How to log from Lua in 1.13.2+ ?

Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

How to log from Lua in 1.13.2+ ?

Postby danielkwinsor » August 22nd, 2016, 2:52 am

Hi,
Found some threads saying to do print('foo') but that doesn't seem to help me.
Logs also moved from stdout / err to "Documents\My Games\Wesnoth1.13\logs"
Found `log` command but don't know of any domains.
danielkwinsor
 
Posts: 5
Joined: August 20th, 2016, 9:39 pm

Re: How to log from Lua in 1.13.2+ ?

Postby Tad_Carlucci » August 22nd, 2016, 1:54 pm

Do you mean:

Code: Select all
    function wml_actions.wml_message(cfg)
        local logger = cfg.logger or ''
        wesnoth.log(cfg.logger, cfg.message, cfg.to_chat)
    end


as documented on the wiki: https://wiki.wesnoth.org/InterfaceActio ... message.5D

ETA and, yes, I'll get with someone and discuss the rather obvious bug ...
I forked real life and now I'm getting merge conflicts.
Tad_Carlucci
Developer
 
Posts: 204
Joined: April 24th, 2016, 4:18 pm


Return to Lua Labs

Who is online

Users browsing this forum: No registered users and 1 guest