Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibGDX logging not showing up in logcat

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.

like image 563
Madmenyo Avatar asked Oct 07 '14 17:10

Madmenyo


People also ask

Why is my Logcat not showing anything in Android?

Solution 1: Restarting your Android StudioIn your IDE Go to File > Invalidate Caches and Restart > Invalidate and Restart. This Solution will clear all the caches of Android studio IDE and restart it automatically, By the method, there are 80% change that Logcat will start work as before.

What is verbose in Android Logcat?

Verbose: Show all log messages (the default). Debug: Show debug log messages that are useful during development only, as well as the message levels lower in this list. Info: Show expected log messages for regular usage, as well as the message levels lower in this list.

Can not find Logcat in Android Studio?

Go to Project Structure -> Facets -> “+” -> Android -> Select Project Logcat should now be visible.

Where can I find Logcat in Android Studio?

Logcat window in Android Studio is used to display real-time system messages and messages that are added in the Log class of the app. To open Logcat Click View > Tool Windows > Logcat (Alt + 6 or from the toolbar window).


2 Answers

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).

like image 93
Tenfour04 Avatar answered Oct 05 '22 23:10

Tenfour04


Use Gdx.app.log or even System.out.println (write sout (syso in eclipse) and enter );

like image 25
Boldijar Paul Avatar answered Oct 06 '22 00:10

Boldijar Paul