Addign logging handling