【C#Log】C#层log打印走log等级控制

dev_chengFeng
gaoxin 2021-07-09 11:56:53 +08:00
parent 5e1897515b
commit 9b48609229
30 changed files with 134 additions and 135 deletions

View File

@ -287,7 +287,7 @@ public class App : UnitySingleton<App>
/// <param name="hasFocus"></param>
void OnApplicationFocus(bool hasFocus)
{
Debug.Log("App.cs OnApplicationFocus");
XDebug.Log.l("App.cs OnApplicationFocus");
Util.CallMethod("Game", "OnApplicationFocus", hasFocus);
}
@ -297,7 +297,7 @@ public class App : UnitySingleton<App>
/// <param name="pauseStatus"></param>
void OnApplicationPause(bool pauseStatus)
{
Debug.Log("App.cs OnApplicationPause");
XDebug.Log.l("App.cs OnApplicationPause");
Util.CallMethod("Game", "OnApplicationPause", pauseStatus);
}
@ -306,7 +306,7 @@ public class App : UnitySingleton<App>
/// </summary>
void OnApplicationQuit()
{
Debug.Log("App.cs OnApplicationQuit");
XDebug.Log.l("App.cs OnApplicationQuit");
Util.CallMethod("Game", "OnApplicationQuit");
}

View File

@ -33,7 +33,7 @@ namespace GameLogic
{
appId = VersionManager.Instance.GetVersionInfo("buglyId");
}
Debug.Log("Bugly Init: " + appId);
XDebug.Log.l("Bugly Init: " + appId);
BuglyAgent.InitWithAppId(appId);
BuglyAgent.EnableExceptionHandler();
}

View File

@ -40,7 +40,7 @@ public class CompressManager : UnitySingleton<CompressManager>
FileInfo f = new FileInfo(sourcePath);
if ((f.Length / 1024) >= compressSize)
{
Debug.Log("开始压缩,图片原始大小为:" + f.Length / 1000 + "Kb");
XDebug.Log.l("开始压缩,图片原始大小为:" + f.Length / 1000 + "Kb");
}
int qualityI = 50;
@ -56,16 +56,16 @@ public class CompressManager : UnitySingleton<CompressManager>
{
Texture2D t2d = www.texture;
byte[] b = t2d.EncodeToJPG(qualityI);
Debug.Log("图原始读取的字节数 " + (b.Length / 1000).ToString());
XDebug.Log.l("图原始读取的字节数 " + (b.Length / 1000).ToString());
while ((b.Length / 1024) >= compressSize && qualityI>0)
{
qualityI -= 5;
b = t2d.EncodeToJPG(qualityI);
Debug.Log("当前大小:" + b.Length / 1000);
XDebug.Log.l("当前大小:" + b.Length / 1000);
}
Debug.Log("压缩成功,当前大小:" + b.Length / 1000);
XDebug.Log.l("压缩成功,当前大小:" + b.Length / 1000);
File.WriteAllBytes(outPath, b);
if (action != null)

View File

@ -131,12 +131,12 @@ namespace GameLogic
else
{
string url = AppConst.FilePathEx + configStreamFilePath;
Debug.Log("[ConfigLoader Start ]@" + url);
XDebug.Log.l("[ConfigLoader Start ]@" + url);
WWW _www = new WWW(url);
yield return _www;
if (string.IsNullOrEmpty(_www.error))
{
Debug.Log("[ConfigLoader OK ]=" + _www.text);
XDebug.Log.l("[ConfigLoader OK ]=" + _www.text);
NetInfo = new MConfig(_www.text);
}
else

View File

@ -88,7 +88,7 @@ namespace GameLogic
public SocketClient AddSocket(string ipAddress, int port)
{
Debug.Log("SocketClient AddSocket");
XDebug.Log.l("SocketClient AddSocket");
SocketClient socket = new SocketClient(ipAddress, port);
socket.netMgr = this;
socketList.Add(socket);
@ -205,7 +205,7 @@ namespace GameLogic
duration += Time.deltaTime;
if(duration>=AppConst.HttpTimeout)
{
Debug.Log(url + " HttpPostError: HttpTimeout:"+ AppConst.HttpTimeout+" "+ data);
XDebug.Log.l(url + " HttpPostError: HttpTimeout:"+ AppConst.HttpTimeout+" "+ data);
if (errorAction != null)
errorAction();
@ -221,7 +221,7 @@ namespace GameLogic
Debug.LogWarning(url+" Result: " + result);
if (postData.error != null)
{
Debug.Log("HttpPostError: " + postData.error);
XDebug.Log.l("HttpPostError: " + postData.error);
if (errorAction != null)
errorAction();

View File

@ -105,9 +105,9 @@ public class RoleRenderManager : UnitySingleton<RoleRenderManager>
}
for(int i = 0; i < 6; i++)
{
Debug.Log("加载材质:");
XDebug.Log.l("加载材质:");
Material m = App.ResMgr.LoadAsset("R" + i) as Material;
Debug.Log("目标材质:" + m.name);
XDebug.Log.l("目标材质:" + m.name);
TargetMaterial[i] = m;
}
}

View File

@ -40,32 +40,32 @@ namespace GameLogic {
// string joinSuccessMessage = string.Format("joinChannel callback uid: {0}, channel: {1}, version: {2}", uid, channelName, RtcEngineForGaming.GetSdkVersion());
// selfID = uid;
// //Debug.LogWarning("~~~~~~~~~~~~~~~~~~~~~~~~~~~~Self ID: " + uid);
// Debug.Log(joinSuccessMessage);
// XDebug.Log.l(joinSuccessMessage);
//};
//mRtcEngine.OnLeaveChannel += (RtcStats stats) =>
//{
// string leaveChannelMessage = string.Format("onLeaveChannel callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}", stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate);
// Debug.Log(leaveChannelMessage);
// XDebug.Log.l(leaveChannelMessage);
//};
//mRtcEngine.OnUserJoined += (uint uid, int elapsed) =>
//{
// string userJoinedMessage = string.Format("onUserJoined callback uid {0} {1}", uid, elapsed);
// Debug.Log(userJoinedMessage);
// XDebug.Log.l(userJoinedMessage);
//};
//mRtcEngine.OnUserOffline += (uint uid, USER_OFFLINE_REASON reason) =>
//{
// string userOfflineMessage = string.Format("onUserOffline callback uid {0} {1}", uid, reason);
// Debug.Log(userOfflineMessage);
// XDebug.Log.l(userOfflineMessage);
//};
//mRtcEngine.OnVolumeIndication += (AudioVolumeInfo[] speakers, int speakerNumber, int totalVolume) =>
//{
// //if (speakerNumber == 0 || speakers == null)
// //{
// // //Debug.Log(string.Format("onVolumeIndication only local {0}", totalVolume));
// // //XDebug.Log.l(string.Format("onVolumeIndication only local {0}", totalVolume));
// //}
// for (int idx = 0; idx < speakerNumber; idx++)
@ -82,7 +82,7 @@ namespace GameLogic {
//mRtcEngine.OnUserMuted += (uint uid, bool muted) =>
//{
// // string userMutedMessage = string.Format("onUserMuted callback uid {0} {1}", uid, muted);
// //Debug.Log(userMutedMessage);
// //XDebug.Log.l(userMutedMessage);
// uint id = uid;
// if (id == 0) id = selfID;
@ -93,51 +93,51 @@ namespace GameLogic {
//{
// string description = RtcEngineForGaming.GetErrorDescription(warn);
// string warningMessage = string.Format("onWarning callback {0} {1} {2}", warn, msg, description);
// Debug.Log(warningMessage);
// XDebug.Log.l(warningMessage);
//};
//mRtcEngine.OnError += (int error, string msg) =>
//{
// string description = RtcEngineForGaming.GetErrorDescription(error);
// string errorMessage = string.Format("onError callback {0} {1} {2}", error, msg, description);
// Debug.Log(errorMessage);
// XDebug.Log.l(errorMessage);
//};
//mRtcEngine.OnRtcStats += (RtcStats stats) =>
//{
// string rtcStatsMessage = string.Format("onRtcStats callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}, tx(a) kbps: {5}, rx(a) kbps: {6} users {7}",
// stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate, stats.txAudioKBitRate, stats.rxAudioKBitRate, stats.users);
// Debug.Log(rtcStatsMessage);
// XDebug.Log.l(rtcStatsMessage);
// int lengthOfMixingFile = mRtcEngine.GetAudioMixingDuration();
// int currentTs = mRtcEngine.GetAudioMixingCurrentPosition();
// string mixingMessage = string.Format("Mixing File Meta {0}, {1}", lengthOfMixingFile, currentTs);
// Debug.Log(mixingMessage);
// XDebug.Log.l(mixingMessage);
//};
//mRtcEngine.OnAudioRouteChanged += (AUDIO_ROUTE route) =>
//{
// string routeMessage = string.Format("onAudioRouteChanged {0}", route);
// Debug.Log(routeMessage);
// XDebug.Log.l(routeMessage);
//};
//mRtcEngine.OnRequestChannelKey += () =>
//{
// string requestKeyMessage = string.Format("OnRequestChannelKey");
// Debug.Log(requestKeyMessage);
// XDebug.Log.l(requestKeyMessage);
//};
//mRtcEngine.OnConnectionInterrupted += () =>
//{
// string interruptedMessage = string.Format("OnConnectionInterrupted");
// Debug.Log(interruptedMessage);
// XDebug.Log.l(interruptedMessage);
//};
//mRtcEngine.OnConnectionLost += () =>
//{
// string lostMessage = string.Format("OnConnectionLost");
// Debug.Log(lostMessage);
// XDebug.Log.l(lostMessage);
//};
//mRtcEngine.SetLogFilter(LOG_FILTER.INFO);
@ -185,7 +185,7 @@ namespace GameLogic {
// yield return new WaitForEndOfFrame();
// if (mRtcEngine == null) yield break;
// Debug.Log(string.Format("tap joinChannel with channel name {0}", channelName));
// XDebug.Log.l(string.Format("tap joinChannel with channel name {0}", channelName));
// if (string.IsNullOrEmpty(channelName))
// {
// yield break;

View File

@ -23,7 +23,7 @@ namespace GameLogic
private Dictionary<string, object> stringToDic(string s)
{
Debug.Log("stringToDic***************" + s);
XDebug.Log.l("stringToDic***************" + s);
Dictionary<string, object> d = new Dictionary<string, object>();
if (s == "") return d;
string[] kvs = s.Split('|');
@ -100,7 +100,7 @@ namespace GameLogic
foreach (string id in data.Keys)
{
object value = data[id];
Debug.Log("value:" + value.ToString());
XDebug.Log.l("value:" + value.ToString());
}
ThinkingAnalyticsAPI.SetSuperProperties(data);
}
@ -114,8 +114,8 @@ namespace GameLogic
public void Track(string trackEvent, string trackData)
{
Debug.Log("事件名称:" + trackEvent);
Debug.Log("事件数据:" + trackData);
XDebug.Log.l("事件名称:" + trackEvent);
XDebug.Log.l("事件数据:" + trackData);
Dictionary<string, object> data = stringToDic(trackData);
ThinkingAnalyticsAPI.Track(trackEvent, data);
}
@ -127,8 +127,8 @@ namespace GameLogic
}
// Debug.Log("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());
// Debug.Log("TA.TAExample - the device ID is: " + ThinkingAnalyticsAPI.GetDeviceId());
// XDebug.Log.l("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());
// XDebug.Log.l("TA.TAExample - the device ID is: " + ThinkingAnalyticsAPI.GetDeviceId());
// // 设置动态公共属性,传 this 是因为 this 实现了 IDynamicSuperProperties
// ThinkingAnalyticsAPI.SetDynamicSuperProperties(this);

View File

@ -111,7 +111,7 @@ public class SocketClient
public SocketClient(string ipAddress, int port)
{
//Debug.Log("****Socket*********************创建一个Socket ---" + ipAddress);
//XDebug.Log.l("****Socket*********************创建一个Socket ---" + ipAddress);
IpAddress = ipAddress;
Port = port;
_memStream = new MemoryStream();
@ -134,7 +134,7 @@ public class SocketClient
/// </summary>
public void Connect()
{
//Debug.Log("****Socket*********************Connect ---" + IpAddress);
//XDebug.Log.l("****Socket*********************Connect ---" + IpAddress);
Close();
try
{
@ -155,7 +155,7 @@ public class SocketClient
public void OnConnectFail()
{
//Debug.Log("****Socket*********************OnConnectFail ---" + IpAddress);
//XDebug.Log.l("****Socket*********************OnConnectFail ---" + IpAddress);
AddStateInfo(NetworkStateType.ConnectFail, null);
}
@ -164,7 +164,7 @@ public class SocketClient
/// </summary>
void OnConnect(IAsyncResult asr)
{
//Debug.Log("****Socket*********************OnConnect ---" + IpAddress);
//XDebug.Log.l("****Socket*********************OnConnect ---" + IpAddress);
//outStream = client.GetStream();
//client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
//AddStateInfo(NetworkStateType.Connected, null);
@ -174,7 +174,7 @@ public class SocketClient
//检测是否成功的建立了链接。..
if (client == null || !client.Connected)
{
Debug.Log("****Socket*********************OnConnect FAILED ---" + IpAddress);
XDebug.Log.l("****Socket*********************OnConnect FAILED ---" + IpAddress);
return;
}
try
@ -186,11 +186,11 @@ public class SocketClient
outStream = client.GetStream();
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
AddStateInfo(NetworkStateType.Connected, null);
Debug.Log("****Socket*********************OnConnect SUCCESS ---" + IpAddress);
XDebug.Log.l("****Socket*********************OnConnect SUCCESS ---" + IpAddress);
}
catch (Exception e)
{
Debug.Log("****Socket*********************OnConnect FAILED ---" + e.Message);
XDebug.Log.l("****Socket*********************OnConnect FAILED ---" + e.Message);
}
}
@ -226,7 +226,7 @@ public class SocketClient
}
else
{
Debug.Log("client.connected----->>false");
XDebug.Log.l("client.connected----->>false");
}
}
}
@ -249,7 +249,7 @@ public class SocketClient
return;
//int ilen = client.GetStream().EndRead(asr);
// Debug.Log("[SocketClient] From Socket: EndRead.Len:" + ilen);
// XDebug.Log.l("[SocketClient] From Socket: EndRead.Len:" + ilen);
lock (client.GetStream())
@ -264,7 +264,7 @@ public class SocketClient
AddStateInfo(NetworkStateType.Disconnect, "bytesRead < 1");
return;
}
//Debug.Log("[SocketClient] NowClient:@" + ++_NNN+" _:"+bytesRead + ":" + client.Client.Handle);
//XDebug.Log.l("[SocketClient] NowClient:@" + ++_NNN+" _:"+bytesRead + ":" + client.Client.Handle);
OnReceive(byteBuffer, bytesRead); //分析数据包内容,抛给逻辑层
lock (client.GetStream())
@ -274,7 +274,7 @@ public class SocketClient
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
}
//Debug.Log("SocketClient.OnRead " + byteBuffer.ToString());
//XDebug.Log.l("SocketClient.OnRead " + byteBuffer.ToString());
}
catch (Exception ex)
{
@ -335,7 +335,7 @@ public class SocketClient
void OnReceive(byte[] bytes, int length)
{
//Debug.Log("****Socket*********************OnReceive ---" + IpAddress);
//XDebug.Log.l("****Socket*********************OnReceive ---" + IpAddress);
try
{
var stream = CurMemoryStream;
@ -403,7 +403,7 @@ public class SocketClient
buffer.ReadIntToByte();
//协议号
int msgid = buffer.ReadIntToByte();
//Debug.Log("[SocketClient:OnReceivedMessage]msgid:" + msgid);
//XDebug.Log.l("[SocketClient:OnReceivedMessage]msgid:" + msgid);
//收到心跳包
if (msgid == 1001)
{
@ -426,7 +426,7 @@ public class SocketClient
private void Ygqmgx_indicationErrorAction(ByteBuffer buffer)
{
//Debug.Log("****Socket*********************indicationErrorAction ---" + IpAddress);
//XDebug.Log.l("****Socket*********************indicationErrorAction ---" + IpAddress);
Util.CallMethod("SocketManager", "ReceiveErrorInfo", this, buffer);
}
@ -444,11 +444,11 @@ public class SocketClient
try
{
client.Client.Disconnect(false);
//Debug.Log("****Socket*********************Disconnect() ---" + client.Client.Handle+ "@"+ client.Client.LocalEndPoint.ToString());
//XDebug.Log.l("****Socket*********************Disconnect() ---" + client.Client.Handle+ "@"+ client.Client.LocalEndPoint.ToString());
}
catch { }
Debug.Log("****Socket*********************Close ---" + client.Client.Handle);
XDebug.Log.l("****Socket*********************Close ---" + client.Client.Handle);
try
{
client.Close();
@ -549,7 +549,7 @@ public class SocketClient
if (testConnect)
{
UnityEngine.Debug.Log("~~~~~~~~~~~~~测试掉线~~~~~~~~~~~~~~~");
XDebug.Log.l("~~~~~~~~~~~~~测试掉线~~~~~~~~~~~~~~~");
}
if (m_isConnecting && !testConnect)
@ -566,7 +566,7 @@ public class SocketClient
//FHF Debug time preform
// stw.Stop();
// if(_CCC>0)
// UnityEngine.Debug.Log("NET EVENT HANDLE: " + _CCC.ToString()+"@"+(stw.ElapsedTicks).ToString());
// UnityEngine.XDebug.Log.l("NET EVENT HANDLE: " + _CCC.ToString()+"@"+(stw.ElapsedTicks).ToString());
}
void DispatchMessage(NetMsg _event)
@ -637,7 +637,7 @@ public class SocketClient
public void Disconnect(string _err)
{
Error = _err;
Debug.Log("****Socket*********************Disconnect [" + Error + "] ---" + IpAddress);
XDebug.Log.l("****Socket*********************Disconnect [" + Error + "] ---" + IpAddress);
Close();
Util.CallMethod("SocketManager", "OnDisconnect", this, _err);
}
@ -646,7 +646,7 @@ public class SocketClient
IEnumerator CheckConnect_Co()
{
yield return new WaitForEndOfFrame();
Debug.LogWarning("Start Connecting IP: " + IpAddress + " Port: " + Port);
XDebug.Log.warning("Start Connecting IP: " + IpAddress + " Port: " + Port);
Connect();
m_isConnecting = true;
yield return new WaitForSeconds(AppConst.ConnectTimeout);
@ -663,7 +663,7 @@ public class SocketClient
/// </summary>
public void TryConnect()
{
//Debug.Log("****Socket*********************TryConnect ---" + IpAddress);
//XDebug.Log.l("****Socket*********************TryConnect ---" + IpAddress);
if (IsConnected())
{
NetworkStateInfo info = new NetworkStateInfo();
@ -725,7 +725,7 @@ public class SocketClient
_LastReconectime = Time.time;
Debug.Log("****Socket*********************TryReconnect ---" + IpAddress);
XDebug.Log.l("****Socket*********************TryReconnect ---" + IpAddress);
@ -739,7 +739,7 @@ public class SocketClient
public void Reconnect()
{
Debug.Log("****Socket*********************Reconnect ---" + IpAddress);
XDebug.Log.l("****Socket*********************Reconnect ---" + IpAddress);
Close();
@ -748,7 +748,7 @@ public class SocketClient
var ipType = GetIPAddressType(IpAddress);
client = null;
client = new TcpClient(ipType);
Debug.Log("****Socket*********************NEW ---" + client.Client.Handle);
XDebug.Log.l("****Socket*********************NEW ---" + client.Client.Handle);
//client.SendTimeout = 1000;
//client.ReceiveTimeout = 1000;
client.NoDelay = true;
@ -804,7 +804,7 @@ public class SocketClient
public void OnReconnectFail()
{
Debug.Log("****Socket*********************OnReconnectFail ---" + IpAddress);
XDebug.Log.l("****Socket*********************OnReconnectFail ---" + IpAddress);
AddStateInfo(NetworkStateType.ReconnectFail, null);
}
@ -816,7 +816,7 @@ public class SocketClient
//检测是否成功的建立了链接。..
if (client == null || !client.Connected)
{
Debug.Log("****Socket*********************OnReconnect FAILED ---" + IpAddress);
XDebug.Log.l("****Socket*********************OnReconnect FAILED ---" + IpAddress);
return;
}
try
@ -829,11 +829,11 @@ public class SocketClient
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
AddStateInfo(NetworkStateType.Reconnected, null);
_LastReconectime = 0;
Debug.Log("****Socket*********************OnReconnect SUCCESS @"+ client.Client.LocalEndPoint.ToString());
XDebug.Log.l("****Socket*********************OnReconnect SUCCESS @"+ client.Client.LocalEndPoint.ToString());
}
catch (Exception e)
{
Debug.Log("****Socket*********************OnReconnect FAILED ---" + e.Message);
XDebug.Log.l("****Socket*********************OnReconnect FAILED ---" + e.Message);
}
}
@ -870,7 +870,7 @@ public class SocketClient
buffer.Close();
//Debug.Log("[SocketClient.m_SendMessage]..."+ msgId);
//XDebug.Log.l("[SocketClient.m_SendMessage]..."+ msgId);
}
/// <summary>

View File

@ -18,7 +18,7 @@ namespace SDK
public AndroidProxy()
{
Debug.Log("AndroidProxy INit");
XDebug.Log.l("AndroidProxy INit");
var player = new AndroidJavaClass(CLS_UNITY_PLAYER);
currentActivity = player.GetStatic<AndroidJavaObject>("currentActivity");
}
@ -58,7 +58,7 @@ namespace SDK
public override void Pay(SDKPayArgs args)
{
Debug.Log("consumerId = " + args.roleID +
XDebug.Log.l("consumerId = " + args.roleID +
",consumerName= " + args.roleName +
",mhtCurrency= " + args.coinNum +
",vipLevel= " + args.vip +

View File

@ -169,7 +169,7 @@ namespace SDK
//sdk 埋点
public void CustomEvent(string events, string desc, string type)
{
Debug.Log("sdk打点事件" + events + "|" + desc + "|" + type);
XDebug.Log.l("sdk打点事件" + events + "|" + desc + "|" + type);
if(events == null||events == "")
{
return;
@ -189,7 +189,7 @@ namespace SDK
//sdk init 回调
public void InitCallback(string data)
{
Debug.Log("Helper : InitCallback - data: " + data);
XDebug.Log.l("Helper : InitCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_InitCallback,
@ -199,7 +199,7 @@ namespace SDK
//sdk 注册 回调
public void RegisterCallback(string data)
{
Debug.Log("Helper : RegisterCallback - data: " + data);
XDebug.Log.l("Helper : RegisterCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_RegisterCallback,
@ -209,7 +209,7 @@ namespace SDK
//sdk login 回调
public void LoginCallback(string data)
{
Debug.Log("Helper : LoginCallback - data: " + data);
XDebug.Log.l("Helper : LoginCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_LoginCallback,
@ -219,7 +219,7 @@ namespace SDK
//sdk Pay回调
public void PayCallback(string data)
{
Debug.Log("Helper : PayCallback - data: " + data);
XDebug.Log.l("Helper : PayCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_PayCallback,
@ -230,7 +230,7 @@ namespace SDK
//sdk SwitchAccount回调
public void SwitchAccountCallback(string data)
{
Debug.Log("Helper : SwitchAccountCallback - data: " + data);
XDebug.Log.l("Helper : SwitchAccountCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_SwitchAccountCallback,
@ -241,7 +241,7 @@ namespace SDK
//sdk Logout回调
public void LogoutCallback(string data)
{
Debug.Log("Helper : LogoutCallback - data: " + data);
XDebug.Log.l("Helper : LogoutCallback - data: " + data);
proxy.PushMessage(new Message
{
msgId = MessageDef.MSG_LogoutCallback,

View File

@ -87,7 +87,7 @@ public class AndroidDeviceInfo
}
public void DeviceInit()
{
Debug.Log("设备信息初始化");
XDebug.Log.l("设备信息初始化");
}
//设备机型类型
public string GetDeviceBrand()

View File

@ -56,7 +56,7 @@ public class NotchScreenUtil
public void Init()
{
Debug.Log("设备信息初始化");
XDebug.Log.l("设备信息初始化");
}

View File

@ -73,10 +73,10 @@ public class CheckInputLength : MonoBehaviour
{
output += Convert.ToString((int)encodedBytes[byteIndex], 2) + " ";//二进制
}
Debug.Log(output);
XDebug.Log.l(output);
int byteCount = System.Text.ASCIIEncoding.UTF8.GetByteCount(tempStr);
Debug.Log("字节数=" + byteCount);
XDebug.Log.l("字节数=" + byteCount);
if (byteCount > 1)
{

View File

@ -185,7 +185,7 @@ namespace ToJ
if ((_maskedSpriteWorldCoordsShader == null) || (_maskedUnlitWorldCoordsShader == null))
{
Debug.Log("Shaders necessary for masking don't seem to be present in the project.");
XDebug.Log.l("Shaders necessary for masking don't seem to be present in the project.");
return;
}
SetMesh ();
@ -194,17 +194,17 @@ namespace ToJ
{
if ((maskMappingWorldAxis == MappingAxis.X) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, invertAxis ? -90 : 90)) > 0.01f)))
{
Debug.Log("You cannot edit X and Y values of the Mask transform rotation!");
XDebug.Log.l("You cannot edit X and Y values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(0, invertAxis ? 270 : 90, transform.eulerAngles.z);
}
else if ((maskMappingWorldAxis == MappingAxis.Y) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, invertAxis ? -90 : 90)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.z, 0)) > 0.01f)))
{
Debug.Log("You cannot edit X and Z values of the Mask transform rotation!");
XDebug.Log.l("You cannot edit X and Z values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(invertAxis ? -90 : 90, transform.eulerAngles.y, 0);
}
else if ((maskMappingWorldAxis == MappingAxis.Z) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, (invertAxis ? -180 : 0))) > 0.01f)))
{
Debug.Log("You cannot edit X and Y values of the Mask transform rotation!");
XDebug.Log.l("You cannot edit X and Y values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(0, invertAxis ? -180 : 0, transform.eulerAngles.z);
}
@ -255,13 +255,13 @@ namespace ToJ
if ((material.shader.ToString() == _maskedSpriteWorldCoordsShader.ToString()) &&
(material.shader.GetInstanceID() != _maskedSpriteWorldCoordsShader.GetInstanceID()))
{
Debug.Log("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
XDebug.Log.l("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
_maskedSpriteWorldCoordsShader = null;
}
if ((material.shader.ToString() == _maskedUnlitWorldCoordsShader.ToString()) &&
(material.shader.GetInstanceID() != _maskedUnlitWorldCoordsShader.GetInstanceID()))
{
Debug.Log("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
XDebug.Log.l("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
_maskedUnlitWorldCoordsShader = null;
}

View File

@ -38,14 +38,14 @@ namespace UnityEngine.UI.Extensions
{
base.Awake();
rectTrans = GetComponent<RectTransform>();
Debug.Log("rectTrans:" + rectTrans);
XDebug.Log.l("rectTrans:" + rectTrans);
OnRectTransformDimensionsChange();
}
protected override void OnEnable()
{
base.OnEnable();
rectTrans = GetComponent<RectTransform>();
Debug.Log("rectTrans:" + rectTrans);
XDebug.Log.l("rectTrans:" + rectTrans);
OnRectTransformDimensionsChange();
}
/// <summary>
@ -68,7 +68,7 @@ namespace UnityEngine.UI.Extensions
for (int index = 0; index < verts.Count; index++)
{
var uiVertex = verts[index];
//Debug.Log ();
//XDebug.Log.l ();
uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier;
verts[index] = uiVertex;
}
@ -105,7 +105,7 @@ namespace UnityEngine.UI.Extensions
for (int index = 0; index < verts.Count; index++)
{
var uiVertex = verts[index];
//Debug.Log ();
//XDebug.Log.l ();
uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier;
verts[index] = uiVertex;
}

View File

@ -91,7 +91,7 @@ namespace UnityEngine.UI.Extensions
//
protected void ApplyShadow(List<UIVertex> verts, Color32 color, int start, int end, float x, float y)
{
//Debug.Log("verts count: "+verts.Count);
//XDebug.Log.l("verts count: "+verts.Count);
int num = verts.Count * 2;
if (verts.Capacity < num)
{
@ -103,7 +103,7 @@ namespace UnityEngine.UI.Extensions
verts.Add(uIVertex);
Vector3 position = uIVertex.position;
//Debug.Log("vertex pos: "+position);
//XDebug.Log.l("vertex pos: "+position);
position.x += x;
position.y += y;
uIVertex.position = position;

View File

@ -89,7 +89,6 @@ public class TapDB
}
private static void TapDB_nativeOnResume(){
Debug.Log ("TapDB_nativeOnResume");
AndroidJavaObject activity = getUnityClass().GetStatic<AndroidJavaObject>("currentActivity");
getAgent().CallStatic("onResume", activity);
}

View File

@ -53,16 +53,16 @@ namespace TapDBMiniJSON {
//
// var dict = Json.Deserialize(jsonString) as Dictionary<string,object>;
//
// Debug.Log("deserialized: " + dict.GetType());
// Debug.Log("dict['array'][0]: " + ((List<object>) dict["array"])[0]);
// Debug.Log("dict['string']: " + (string) dict["string"]);
// Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles
// Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs
// Debug.Log("dict['unicode']: " + (string) dict["unicode"]);
// XDebug.Log.l("deserialized: " + dict.GetType());
// XDebug.Log.l("dict['array'][0]: " + ((List<object>) dict["array"])[0]);
// XDebug.Log.l("dict['string']: " + (string) dict["string"]);
// XDebug.Log.l("dict['float']: " + (double) dict["float"]); // floats come out as doubles
// XDebug.Log.l("dict['int']: " + (long) dict["int"]); // ints come out as longs
// XDebug.Log.l("dict['unicode']: " + (string) dict["unicode"]);
//
// var str = Json.Serialize(dict);
//
// Debug.Log("serialized: " + str);
// XDebug.Log.l("serialized: " + str);
// }
// }

View File

@ -94,21 +94,21 @@ namespace GameLogic {
{
if (luaFunction != null)
{
Debug.Log("ResourcesManager LoadAssetAsync luaFunc");
XDebug.Log.l("ResourcesManager LoadAssetAsync luaFunc");
luaFunction.Call(name, obj);
}
else {
Debug.Log("ResourcesManager LoadAssetAsync luaFunc ==null");
XDebug.Log.l("ResourcesManager LoadAssetAsync luaFunc ==null");
}
});
}
public void PreLoadAssetAsync(string assetName, LuaFunction luaFunc)
{
//Debug.Log("预加载资源:" + assetName);
//XDebug.Log.l("预加载资源:" + assetName);
if (File.Exists(AppConst.PersistentDataPath + assetName) && PlayerPrefs.GetInt(assetName + "_IsPreLoad", 0) == 1)
{
//Debug.Log("预加载资源已存在");
//XDebug.Log.l("预加载资源已存在");
if (luaFunc != null)
{
luaFunc.Call(true);
@ -116,12 +116,12 @@ namespace GameLogic {
}else
{
string downLoadURL = VersionManager.Instance.GetVersionInfo("resUrl") + AppConst.PlatformPath + "/";
//Debug.Log("预加载资源路径:"+downLoadURL);
//XDebug.Log.l("预加载资源路径:"+downLoadURL);
ResourceDownloadManager.Instance.StartDownload(assetName, downLoadURL, "", (string name, DownLoadProgress dp) => {
//Debug.LogFormat("预加载资源进度:{0}/{1}", dp.Size, dp.TotalSize);
}, (string name, bool isOk) =>
{
//Debug.Log("预加载资源完成:" + isOk);
//XDebug.Log.l("预加载资源完成:" + isOk);
PlayerPrefs.SetInt(assetName + "_IsPreLoad", 1);
if (luaFunc != null)
{

View File

@ -89,12 +89,12 @@ namespace GameLogic
else
{
string url = AppConst.FilePathEx + VersionsStreamFilePath;
Debug.Log("[VersionLoader Start ]@" + url);
XDebug.Log.l("[VersionLoader Start ]@" + url);
WWW _www = new WWW(url);
yield return _www;
if (string.IsNullOrEmpty(_www.error))
{
Debug.Log("[VersionLoader OK ]=" + _www.text);
XDebug.Log.l("[VersionLoader OK ]=" + _www.text);
VersionInfo = new Version(_www.text);
}
else

View File

@ -131,12 +131,12 @@ namespace ResMgr {
}
public IEnumerator LoadTextureFromStream(string name, LuaFunction luaFunction)
{
Debug.Log(Application.streamingAssetsPath + "/Res/" + name + ".png");
XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".png");
UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/"+ name + ".png");
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
XDebug.Log.l(www.error);
if (luaFunction != null)
{
luaFunction.Call(false);
@ -158,12 +158,12 @@ namespace ResMgr {
}
public IEnumerator LoadTextFromStream(string name, LuaFunction luaFunction)
{
Debug.Log(Application.streamingAssetsPath + "/Res/" + name + ".txt");
XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".txt");
UnityWebRequest www = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/" + name + ".txt");
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
XDebug.Log.l(www.error);
if (luaFunction != null)
{
luaFunction.Call(false);

View File

@ -285,7 +285,7 @@ namespace ResMgr
{
if (tmpLoader == null)
{
Debug.Log("RunttimeResLoader LoadAssetAsync tmpLoader == null abname: " + name);
XDebug.Log.l("RunttimeResLoader LoadAssetAsync tmpLoader == null abname: " + name);
}
if (tmpLoader.AbLoaderState == ABLoaderState.Failed)

View File

@ -477,7 +477,7 @@ namespace ResUpdate
if (localCrc == fileCRC)
{
FileUtil.MoveFile(fileLocalCache, savePath);
if (BaseLogger.isDebug) Debug.Log(string.Format("Finish download success file {0}", fileName));
if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Finish download success file {0}", fileName));
}
else
{
@ -490,7 +490,7 @@ namespace ResUpdate
else
{
FileUtil.MoveFile(fileLocalCache, savePath);
if (BaseLogger.isDebug) Debug.Log(string.Format("Finish download success file {0}", fileName));
if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Finish download success file {0}", fileName));
}
}
}

View File

@ -246,7 +246,7 @@ namespace ResUpdate
if (finishedRequest.ContainsKey(file))
{
if (BaseLogger.isDebug) Debug.Log(string.Format("Re download file: {0}.", file));
if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Re download file: {0}.", file));
finishedRequest.Remove(file);
}
@ -274,7 +274,7 @@ namespace ResUpdate
if (finishedRequest.ContainsKey(file))
{
if (BaseLogger.isDebug) Debug.Log(string.Format("Re download file: {0}.", file));
if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Re download file: {0}.", file));
finishedRequest.Remove(file);
}
@ -347,7 +347,7 @@ namespace ResUpdate
if (curNetworkStatus != state)
{
curNetworkStatus = state;
if (BaseLogger.isDebug) Debug.Log(string.Format("curNetworkStatus changed:{0}", curNetworkStatus));
if (BaseLogger.isDebug) XDebug.Log.l(string.Format("curNetworkStatus changed:{0}", curNetworkStatus));
if (!IsNetworkReachable)
{

View File

@ -317,7 +317,7 @@ namespace ResUpdate
// 获取config
string conUrl = downLoadURL + AppConst.GameConfigFile;
Debug.Log("Download_Resouces_Url:" + conUrl);
XDebug.Log.l("Download_Resouces_Url:" + conUrl);
UnityWebRequest request0 = UnityWebRequest.Get(conUrl);
request0.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey();
yield return request0.SendWebRequest();
@ -328,7 +328,7 @@ namespace ResUpdate
}
else
{
Debug.Log("www.text.config:" + request0.downloadHandler.text);
XDebug.Log.l("www.text.config:" + request0.downloadHandler.text);
ConfigManager.Instance.SetNetInfo(request0.downloadHandler.text);
// 初始化语言
SLanguageMoreLanguageMgr.Instance.InitData();
@ -336,7 +336,7 @@ namespace ResUpdate
// 获取version
string resUrl = downLoadURL + AppConst.GameVersionFile;
Debug.Log("Download_Resouces_Url:" + resUrl);
XDebug.Log.l("Download_Resouces_Url:" + resUrl);
UnityWebRequest request = UnityWebRequest.Get(resUrl);
request.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey();
@ -348,7 +348,7 @@ namespace ResUpdate
}
else
{
Debug.Log("www.text.version:" + request.downloadHandler.text);
XDebug.Log.l("www.text.version:" + request.downloadHandler.text);
Hashtable table = MiniJSON.jsonDecode(request.downloadHandler.text) as Hashtable;
if (table == null)
@ -371,12 +371,12 @@ namespace ResUpdate
string version = table["version"] as string;
int result = VersionManager.VersionCompare(version, localVersion);
//下载链接
Debug.Log(string.Format("ResUpdate=====>InitDownLoadURL,Version:{0},loadVersion:{1}", version, localVersion));
Debug.Log(string.Format("Version Compare result:{0}", result));
XDebug.Log.l(string.Format("ResUpdate=====>InitDownLoadURL,Version:{0},loadVersion:{1}", version, localVersion));
XDebug.Log.l(string.Format("Version Compare result:{0}", result));
//如果版本号一致,就不进行更新了
if (result == 0)
{
Debug.Log(string.Format("version:{0},版本号一致,更新完成", version));
XDebug.Log.l(string.Format("version:{0},版本号一致,更新完成", version));
UpdateSuccess();
}
else
@ -416,7 +416,7 @@ namespace ResUpdate
/// <param name="isSuccess"></param>
void DownLoadVersionFilesFinishCallBack(string fileName, bool isSuccess)
{
Debug.Log(string.Format("ResUpdate=====>DownLoadVersionFilesFinishCallBack,FileName:{0},IsSuccess:{1}", fileName, isSuccess));
XDebug.Log.l(string.Format("ResUpdate=====>DownLoadVersionFilesFinishCallBack,FileName:{0},IsSuccess:{1}", fileName, isSuccess));
if (isSuccess)
{
CalculateDownLoadFiles();

View File

@ -142,7 +142,7 @@ namespace GameLogic
}
private void ReadJson(string strjson)
{
Debug.Log(strjson);
XDebug.Log.l(strjson);
data = JsonMapper.ToObject<Hashtable>(strjson);
}
@ -192,7 +192,7 @@ namespace GameLogic
case 1: languageStr = "英文"; break;
case 2: languageStr = "越南语"; break;
}
Debug.Log("当前语言是:" + languageStr);
XDebug.Log.l("当前语言是:" + languageStr);
}
/// <summary>
@ -227,13 +227,13 @@ namespace GameLogic
else
{
//取默认值
Debug.Log("language.txt is no exist get the default");
XDebug.Log.l("language.txt is no exist get the default");
}
}
}
catch (Exception ex)
{
Debug.Log(ex.ToString());
XDebug.Log.l(ex.ToString());
}
}
@ -262,7 +262,7 @@ namespace GameLogic
}
catch (Exception e)
{
Debug.Log(e.ToString());
XDebug.Log.l(e.ToString());
}
return languageThrans;

View File

@ -39,12 +39,12 @@ namespace GameLogic
public IEnumerator LoadFromStream(Action<Sprite> act)
{
Debug.Log(Application.streamingAssetsPath + "/Res/PackConfig.txt");
XDebug.Log.l(Application.streamingAssetsPath + "/Res/PackConfig.txt");
UnityWebRequest uwr = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/PackConfig.txt");
yield return uwr.SendWebRequest();
if (uwr.isNetworkError || uwr.isHttpError)
{
Debug.Log(uwr.error);
XDebug.Log.l(uwr.error);
if (act != null)
{
act(null);
@ -59,7 +59,7 @@ namespace GameLogic
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
XDebug.Log.l(www.error);
if (act != null)
{
act(null);
@ -67,7 +67,7 @@ namespace GameLogic
}
else
{
Debug.Log("load success");
XDebug.Log.l("load success");
Texture2D tex = ((DownloadHandlerTexture)www.downloadHandler).texture;
Sprite sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0));
if (act != null)

View File

@ -588,7 +588,7 @@ public class MiniJSON
protected static bool serializeValue( object value, StringBuilder builder )
{
//Type t = value.GetType();
//UnityEngine.Debug.Log("type: " + t.ToString() + " isArray: " + t.IsArray);
//UnityEngine.XDebug.Log.l("type: " + t.ToString() + " isArray: " + t.IsArray);
if( value == null )
{

View File

@ -38,7 +38,7 @@ public class UIBgAdaptive : MonoBehaviour
float ft = Mathf.Pow(10, avg);
float curHeight = Screen.height / ft;
float curWidth = curHeight /1920f * 1080f;
//Debug.Log("Screen.height " + Screen.height+ " curWidth "+ curWidth);
//XDebug.Log.l("Screen.height " + Screen.height+ " curWidth "+ curWidth);
bgList[i].GetComponent<RectTransform>().sizeDelta = new Vector2(curWidth, curHeight);
}
else