How to log from Lua in 1.13.2+ ?

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

Moderators: Forum Moderators, Developers

Post Reply
danielkwinsor
Posts: 5
Joined: August 20th, 2016, 9:39 pm

How to log from Lua in 1.13.2+ ?

Post by 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.

Tad_Carlucci
Developer
Posts: 301
Joined: April 24th, 2016, 4:18 pm

Re: How to log from Lua in 1.13.2+ ?

Post by 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.

Post Reply