Revision | 0c090207dd985bd39b7623f33d7759fe97015b2b (tree) |
---|---|
Time | 2013-10-15 20:45:50 |
Author | Nathan Sweet <nathan.sweet@gmai...> |
Commiter | Nathan Sweet |
Merge pull request #834 from jrenner/get-log-level
getLogLevel() in Application interface
@@ -401,6 +401,11 @@ public class AndroidApplication extends Activity implements Application { | ||
401 | 401 | } |
402 | 402 | |
403 | 403 | @Override |
404 | + public int getLogLevel() { | |
405 | + return logLevel; | |
406 | + } | |
407 | + | |
408 | + @Override | |
404 | 409 | public void addLifecycleListener (LifecycleListener listener) { |
405 | 410 | synchronized(lifecycleListeners) { |
406 | 411 | lifecycleListeners.add(listener); |
@@ -391,6 +391,11 @@ public class AndroidDaydream extends DreamService implements Application { | ||
391 | 391 | } |
392 | 392 | |
393 | 393 | @Override |
394 | + public int getLogLevel() { | |
395 | + return logLevel; | |
396 | + } | |
397 | + | |
398 | + @Override | |
394 | 399 | public void addLifecycleListener (LifecycleListener listener) { |
395 | 400 | synchronized (lifecycleListeners) { |
396 | 401 | lifecycleListeners.add(listener); |
@@ -348,6 +348,11 @@ public class AndroidLiveWallpaper implements Application { | ||
348 | 348 | } |
349 | 349 | |
350 | 350 | @Override |
351 | + public int getLogLevel() { | |
352 | + return logLevel; | |
353 | + } | |
354 | + | |
355 | + @Override | |
351 | 356 | public void exit () { |
352 | 357 | // no-op |
353 | 358 | } |
@@ -1,17 +1,17 @@ | ||
1 | -/******************************************************************************* | |
2 | - * Copyright 2011 See AUTHORS file. | |
3 | - * | |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | - * you may not use this file except in compliance with the License. | |
6 | - * You may obtain a copy of the License at | |
7 | - * | |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | - * | |
10 | - * Unless required by applicable law or agreed to in writing, software | |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | - * See the License for the specific language governing permissions and | |
14 | - * limitations under the License. | |
1 | +/******************************************************************************* | |
2 | + * Copyright 2011 See AUTHORS file. | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | 15 | ******************************************************************************/ |
16 | 16 | |
17 | 17 | package com.badlogic.gdx.backends.jglfw; |
@@ -353,6 +353,11 @@ public class JglfwApplication implements Application { | ||
353 | 353 | this.logLevel = logLevel; |
354 | 354 | } |
355 | 355 | |
356 | + @Override | |
357 | + public int getLogLevel() { | |
358 | + return logLevel; | |
359 | + } | |
360 | + | |
356 | 361 | public void debug (String tag, String message) { |
357 | 362 | if (logLevel >= LOG_DEBUG) { |
358 | 363 | System.out.println(tag + ": " + message); |
@@ -385,6 +385,11 @@ public class LwjglAWTCanvas implements Application { | ||
385 | 385 | } |
386 | 386 | |
387 | 387 | @Override |
388 | + public int getLogLevel() { | |
389 | + return logLevel; | |
390 | + } | |
391 | + | |
392 | + @Override | |
388 | 393 | public void exit () { |
389 | 394 | postRunnable(new Runnable() { |
390 | 395 | @Override |
@@ -375,6 +375,11 @@ public class LwjglApplication implements Application { | ||
375 | 375 | } |
376 | 376 | |
377 | 377 | @Override |
378 | + public int getLogLevel() { | |
379 | + return logLevel; | |
380 | + } | |
381 | + | |
382 | + @Override | |
378 | 383 | public void exit () { |
379 | 384 | postRunnable(new Runnable() { |
380 | 385 | @Override |
@@ -384,6 +384,11 @@ public class LwjglCanvas implements Application { | ||
384 | 384 | } |
385 | 385 | |
386 | 386 | @Override |
387 | + public int getLogLevel() { | |
388 | + return logLevel; | |
389 | + } | |
390 | + | |
391 | + @Override | |
387 | 392 | public void exit () { |
388 | 393 | postRunnable(new Runnable() { |
389 | 394 | @Override |
@@ -1,17 +1,17 @@ | ||
1 | -/******************************************************************************* | |
2 | - * Copyright 2011 See AUTHORS file. | |
3 | - * | |
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | - * you may not use this file except in compliance with the License. | |
6 | - * You may obtain a copy of the License at | |
7 | - * | |
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | - * | |
10 | - * Unless required by applicable law or agreed to in writing, software | |
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | - * See the License for the specific language governing permissions and | |
14 | - * limitations under the License. | |
1 | +/******************************************************************************* | |
2 | + * Copyright 2011 See AUTHORS file. | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | 15 | ******************************************************************************/ |
16 | 16 | |
17 | 17 | package com.badlogic.gdx.backends.iosrobovm; |
@@ -307,6 +307,11 @@ public class IOSApplication implements Application { | ||
307 | 307 | } |
308 | 308 | |
309 | 309 | @Override |
310 | + public int getLogLevel() { | |
311 | + return logLevel; | |
312 | + } | |
313 | + | |
314 | + @Override | |
310 | 315 | public ApplicationType getType () { |
311 | 316 | return ApplicationType.iOS; |
312 | 317 | } |
@@ -365,6 +365,11 @@ public abstract class GwtApplication implements EntryPoint, Application { | ||
365 | 365 | } |
366 | 366 | |
367 | 367 | @Override |
368 | + public int getLogLevel() { | |
369 | + return logLevel; | |
370 | + } | |
371 | + | |
372 | + @Override | |
368 | 373 | public ApplicationType getType () { |
369 | 374 | return ApplicationType.WebGL; |
370 | 375 | } |
@@ -148,6 +148,9 @@ public interface Application { | ||
148 | 148 | * @param logLevel {@link #LOG_NONE}, {@link #LOG_ERROR}, {@link #LOG_INFO}, {@link #LOG_DEBUG}. */ |
149 | 149 | public void setLogLevel (int logLevel); |
150 | 150 | |
151 | + /** Gets the log level. */ | |
152 | + public int getLogLevel(); | |
153 | + | |
151 | 154 | /** @return what {@link ApplicationType} this application has, e.g. Android or Desktop */ |
152 | 155 | public ApplicationType getType (); |
153 | 156 |