rewrite log_callback system, unstable