Преглед на файлове

print macro in/out in verbose mode

Nicolas Cannasse преди 8 години
родител
ревизия
776445d58e
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/macro/macroContext.ml

+ 2 - 0
src/macro/macroContext.ml

@@ -527,10 +527,12 @@ let load_macro ctx display cpath f p =
 		meth
 	in
 	let call args =
+		if ctx.com.verbose then Common.log ctx.com ("Calling macro " ^ s_type_path cpath ^ "." ^ f ^ " (" ^ p.pfile ^ ":" ^ string_of_int (Lexer.get_error_line p) ^ ")");
 		let t = macro_timer ctx ["execution";s_type_path cpath ^ "." ^ f] in
 		incr stats.s_macros_called;
 		let r = Interp.call_path (Interp.get_ctx()) ((fst cpath) @ [(match sub with None -> snd cpath | Some s -> s)]) f args api in
 		t();
+		if ctx.com.verbose then Common.log ctx.com ("Exiting macro " ^ s_type_path cpath ^ "." ^ f);
 		r
 	in
 	mctx, meth, call