OSDN Git Service

getLogLevel() in Application interface
authorJon Renner <rennerjc@gmail.com>
Tue, 15 Oct 2013 11:43:46 +0000 (19:43 +0800)
committerJon Renner <rennerjc@gmail.com>
Tue, 15 Oct 2013 11:43:46 +0000 (19:43 +0800)
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidDaydream.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidLiveWallpaper.java
backends/gdx-backend-jglfw/src/com/badlogic/gdx/backends/jglfw/JglfwApplication.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglAWTCanvas.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java
backends/gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/IOSApplication.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java
gdx/src/com/badlogic/gdx/Application.java

index 46513e5..a0d93b5 100644 (file)
@@ -401,6 +401,11 @@ public class AndroidApplication extends Activity implements Application {
        }\r
 \r
        @Override\r
+       public int getLogLevel() {\r
+               return logLevel;\r
+       }\r
+\r
+       @Override\r
        public void addLifecycleListener (LifecycleListener listener) {\r
                synchronized(lifecycleListeners) {\r
                        lifecycleListeners.add(listener);\r
index 44d8580..10f7211 100644 (file)
@@ -391,6 +391,11 @@ public class AndroidDaydream extends DreamService implements Application {
        }
 
        @Override
+       public int getLogLevel() {
+               return logLevel;
+       }
+
+       @Override
        public void addLifecycleListener (LifecycleListener listener) {
                synchronized (lifecycleListeners) {
                        lifecycleListeners.add(listener);
index f5ef8e8..ccad000 100644 (file)
@@ -348,6 +348,11 @@ public class AndroidLiveWallpaper implements Application {
        }\r
 \r
        @Override\r
+       public int getLogLevel() {\r
+               return logLevel;\r
+       }\r
+\r
+       @Override\r
        public void exit () {\r
                // no-op\r
        }\r
index d3c615c..75d5c2e 100644 (file)
@@ -1,17 +1,17 @@
-/*******************************************************************************\r
- * Copyright 2011 See AUTHORS file.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *   http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+/*******************************************************************************
+ * Copyright 2011 See AUTHORS file.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  ******************************************************************************/
 
 package com.badlogic.gdx.backends.jglfw;
@@ -353,6 +353,11 @@ public class JglfwApplication implements Application {
                this.logLevel = logLevel;
        }
 
+       @Override
+       public int getLogLevel() {
+               return logLevel;
+       }
+
        public void debug (String tag, String message) {
                if (logLevel >= LOG_DEBUG) {
                        System.out.println(tag + ": " + message);
index bcb070d..81e4874 100644 (file)
@@ -385,6 +385,11 @@ public class LwjglAWTCanvas implements Application {
        }
 
        @Override
+       public int getLogLevel() {
+               return logLevel;
+       }
+
+       @Override
        public void exit () {
                postRunnable(new Runnable() {
                        @Override
index 3fa9536..1d1b094 100644 (file)
@@ -375,6 +375,11 @@ public class LwjglApplication implements Application {
        }\r
 \r
        @Override\r
+       public int getLogLevel() {\r
+               return logLevel;\r
+       }\r
+\r
+       @Override\r
        public void exit () {\r
                postRunnable(new Runnable() {\r
                        @Override\r
index 3f0398d..38591b5 100644 (file)
@@ -384,6 +384,11 @@ public class LwjglCanvas implements Application {
        }\r
 \r
        @Override\r
+       public int getLogLevel() {\r
+               return logLevel;\r
+       }\r
+\r
+       @Override\r
        public void exit () {\r
                postRunnable(new Runnable() {\r
                        @Override\r
index eeeb57f..e1bd308 100644 (file)
@@ -1,17 +1,17 @@
-/*******************************************************************************\r
- * Copyright 2011 See AUTHORS file.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *   http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+/*******************************************************************************
+ * Copyright 2011 See AUTHORS file.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  ******************************************************************************/
 
 package com.badlogic.gdx.backends.iosrobovm;
@@ -307,6 +307,11 @@ public class IOSApplication implements Application {
        }
 
        @Override
+       public int getLogLevel() {
+               return logLevel;
+       }
+
+       @Override
        public ApplicationType getType () {
                return ApplicationType.iOS;
        }
index 71ac15d..13b0832 100644 (file)
@@ -365,6 +365,11 @@ public abstract class GwtApplication implements EntryPoint, Application {
        }
 
        @Override
+       public int getLogLevel() {
+               return logLevel;
+       }
+
+       @Override
        public ApplicationType getType () {
                return ApplicationType.WebGL;
        }
index 19a823d..cf8ce5d 100644 (file)
@@ -148,6 +148,9 @@ public interface Application {
         * @param logLevel {@link #LOG_NONE}, {@link #LOG_ERROR}, {@link #LOG_INFO}, {@link #LOG_DEBUG}. */\r
        public void setLogLevel (int logLevel);\r
 \r
+       /** Gets the log level. */\r
+       public int getLogLevel();\r
+\r
        /** @return what {@link ApplicationType} this application has, e.g. Android or Desktop */\r
        public ApplicationType getType ();\r
 \r