Use Log class
This commit is contained in:
@@ -14,6 +14,8 @@ import lime.audio.AudioBuffer;
|
||||
import lime.graphics.Image;
|
||||
import lime.text.Font;
|
||||
import lime.utils.Bytes;
|
||||
import lime.utils.Log;
|
||||
|
||||
|
||||
/**
|
||||
* <p>The Assets class provides a cross-platform interface to access
|
||||
@@ -120,19 +122,19 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] Audio asset \"" + id + "\" exists, but only asynchronously");
|
||||
Log.info ("Audio asset \"" + id + "\" exists, but only asynchronously");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no audio asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no audio asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -169,19 +171,19 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] String or Bytes asset \"" + id + "\" exists, but only asynchronously");
|
||||
Log.info ("String or Bytes asset \"" + id + "\" exists, but only asynchronously");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no String or Bytes asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no String or Bytes asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -232,19 +234,19 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] Font asset \"" + id + "\" exists, but only asynchronously");
|
||||
Log.info ("Font asset \"" + id + "\" exists, but only asynchronously");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no Font asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no Font asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -302,19 +304,19 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] Image asset \"" + id + "\" exists, but only asynchronously");
|
||||
Log.info ("Image asset \"" + id + "\" exists, but only asynchronously");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no Image asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no Image asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -362,13 +364,13 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -405,19 +407,19 @@ class Assets {
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] String asset \"" + id + "\" exists, but only asynchronously");
|
||||
Log.info ("String asset \"" + id + "\" exists, but only asynchronously");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no String asset with an ID of \"" + id + "\"");
|
||||
Log.info ("There is no String asset with an ID of \"" + id + "\"");
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
printError ("[Assets] There is no asset library named \"" + libraryName + "\"");
|
||||
Log.info ("There is no asset library named \"" + libraryName + "\"");
|
||||
|
||||
}
|
||||
|
||||
@@ -866,17 +868,6 @@ class Assets {
|
||||
}
|
||||
|
||||
|
||||
private static inline function printError (message:String):Void {
|
||||
|
||||
#if debug
|
||||
var callstack = CallStack.callStack ();
|
||||
callstack.reverse();
|
||||
trace (CallStack.toString (callstack) + "\n" + message);
|
||||
#else
|
||||
trace (message);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Event Handlers
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package lime;
|
||||
|
||||
|
||||
import haxe.PosInfos;
|
||||
import lime.utils.Log;
|
||||
|
||||
|
||||
class Lib {
|
||||
|
||||
|
||||
@:noCompletion private static var __sentWarnings = new Map<String, Bool> ();
|
||||
|
||||
|
||||
public static function notImplemented (api:String):Void {
|
||||
public static function notImplemented (api:String, ?posInfo:PosInfos):Void {
|
||||
|
||||
if (!__sentWarnings.exists (api)) {
|
||||
|
||||
__sentWarnings.set (api, true);
|
||||
|
||||
trace ("Warning: " + api + " is not implemented");
|
||||
Log.warn (api + " is not implemented", posInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -202,11 +202,7 @@ class Module implements IModule {
|
||||
* Called when a gamepad is connected
|
||||
* @param gamepad The gamepad that was connected
|
||||
*/
|
||||
public function onGamepadConnect (gamepad:Gamepad):Void {
|
||||
|
||||
trace ("onGamepadConnect (module)");
|
||||
|
||||
}
|
||||
public function onGamepadConnect (gamepad:Gamepad):Void { }
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user