I'd recommend to avoid calling a macro, that logs an activity, from macro console - that could be wrong context for this operation.
Try to call
MyCustomActivity act = new MyCustomActivity(AnalyticsContext.ActivityEnvironmentVariables);
act.Log();
from web part for example, preferably on the live site.