LibGDX 日志记录未显示在 logcat 中 [英] LibGDX logging not showing up in logcat
问题描述
我无法在 Android Studio 中使用 LibGDX 日志记录.首先,我认为我遇到了与上一个问题相同的问题,但确保我的应用程序在调试时更新.
I cannot get LibGDX logging to work in Android Studio. First i thought I had the same problem as my previous question but made sure my app updated on debug.
playButton.addListener(new ChangeListener()
{
@Override
public void changed(ChangeEvent event, Actor actor) {
Gdx.app.debug("BUTTON", "playButton Pressed");
optionButton.addAction(Actions.moveBy(-200, 0, 2));
}
});
选项按钮上的测试操作已执行,但我无法显示调试日志.
The test action on the option button is carried out but i cannot get the debug log to show up.
推荐答案
默认日志级别为 LOG_INFO
.要使 Gdx.app.debug
调用起作用,您必须首先调用 Gdx.app.setLogLevel(Application.LOG_DEBUG);
一次(可能是游戏构造函数中的第一行)这样您就可以轻松更改它).
The default Log level is LOG_INFO
. For the Gdx.app.debug
call to work, you must first call Gdx.app.setLogLevel(Application.LOG_DEBUG);
once (probably the first line in your Game's constructor so you can easily change it).
这篇关于LibGDX 日志记录未显示在 logcat 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!