Exemple #1
0
		public static void msg(Dbg.Grp group, int dbgLvl, string str, params int[] parms) {
			if(((conf.isEnabledDebugGroup.get() & (int)group) == 0) || (conf.isEnabledDebugLevel.get() == 0) || (dbgLvl < conf.isEnabledDebugLevel.get())) {
				return;
			}
			
			string outStr = str;
			foreach(int prm in parms) {
				outStr += prm.ToString() + ", ";
			} 
			print("MSG:" + group.ToString() + ": " + outStr);
		}
Exemple #2
0
		public static void trcCaller(Dbg.Grp group, int dbgLvl, string str = "") {
			if(((conf.isEnabledDebugGroup.get() & (int)group) == 0) || (conf.isEnabledDebugLevel.get() == 0) || (dbgLvl < conf.isEnabledDebugLevel.get())) {
				return;
			}
			
			StackTrace st = new StackTrace();
			StackFrame[] frames = st.GetFrames();
			print("TRC:" + group.ToString() + ": " + frames[2].GetMethod().DeclaringType.ToString() + "." + frames[2].GetMethod().Name + ": " + str);
		}
Exemple #3
0
		public static void msg(Dbg.Grp group, int dbgLvl, string str) {
			if(((conf.isEnabledDebugGroup.get() & (int)group) == 0) || (conf.isEnabledDebugLevel.get() == 0) || (dbgLvl < conf.isEnabledDebugLevel.get())) {
				return;
			}
			
			print("MSG:" + group.ToString() + ": " + str);
		}
Exemple #4
0
		public static void trc(
			Dbg.Grp group, 
			int dbgLvl, 
			string str = "",
			[CallerMemberName] string memberName = "",
			[CallerFilePath] string sourceFilePath = "",
			[CallerLineNumber] int sourceLineNumber = 0
		) {
			if(((conf.isEnabledDebugGroup.get() & (int)group) == 0) || (conf.isEnabledDebugLevel.get() == 0) || (dbgLvl < conf.isEnabledDebugLevel.get())) {
				return;
			}
			string remove = "d:\\data\\projects\\TAS\\HCR Mod\\Plugin.HCR\\";			
			string source = sourceFilePath.Remove(sourceFilePath.IndexOf(remove),remove.Length);
			print("TRC:" + group.ToString() + ": " + source + ":" + memberName + ":" + sourceLineNumber + ": " + str);			
		}