please include function print. static void interceptPrintInThisThread(F1 f) { print_byThread().set(f); }