Add TraceLogs generator, fix test agains logs
minor refactoring