Skip to content

[help] more detailed example about jass.log #13

@Tramis

Description

@Tramis

能在文档里加上 jass.log 的路径和级别配置实例吗,我按下面的配置了但是测试时魔兽中道崩殂,似乎读了 0 指针,现在不太确定是不是我的配置出了什么问题
could you add more detailed example about jass.log in the document? I configured it as below but the war3 crashed while I testing it, and it said that it read 0x00000000, I'm not quite sure whether there is a problem

local log = require 'jass.log'

log.path = "C:/Users/xxx/maps/log/"
log.level = 1

log.debug(('玩家[%s][%s]')
        :format(i, Game.players:last()
            :map(function(p) return p:get_name() end)
            :unwrap_or("非玩家")))

把两行配置去掉就不会崩溃了。我顺便想问一下不配置的情况下默认值是多少?
it won't crash if I remove the 2 lines, I also want to know what's the default value of them

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions