Once can do this as below
thread No: (${__threadNum}) - loop - ${__jm__login__idx} ${__machineIP}
NOTE: Replace Login by name of your thread group
__threadNum - will print thread number
__jm__login__idx - will print loop number
__machineIP - will print IP of computer