Created
April 7, 2014 06:19
-
-
Save DemkaAge/10015572 to your computer and use it in GitHub Desktop.
Gwt client console logger wrapper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.brbpm.lecm.utils.client; | |
/** | |
* Утилиту использовать ТОЛЬКО для критических случаев. | |
* Для обычного трейса на клиенте использовать {@link com.google.gwt.core.client.GWT#log(String)} | |
* | |
* @author ikomissarov | |
*/ | |
public class Logger { | |
native static public void warn(String message) /*-{ | |
if (window.console && console.log) console.warn(message); | |
}-*/; | |
native static public void error(String message) /*-{ | |
if (window.console && console.log) console.error(message); | |
}-*/; | |
native static public void log(String message) /*-{ | |
if (window.console && console.log) console.log(message); | |
}-*/; | |
native static public void info(String message)/*-{ | |
if (window.console && console.log) console.info(message); | |
}-*/; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment