I want to output information to a log file as such
01/08/2013 14:30 - Dynamic-Machine-Name - Message starts
02/08/2013 07:12 - DynamicMachineName - Log entry
02/08/2013 07:14 - Dynamic-PC-Name - Information here
02/08/2013 08:01 - PC-Name - Execution continues
03/08/2013 09:00 - Dynamic-Name - Message starts
03/08/2013 15:29 - Dynamic-Machine-Name - Log information
03/08/2013 15:30 - Random-Machine-Name - Message etc.
But in order to align the log message on the right hand side, I need to calculate the length of the machine name, which I have done, and deduct it from the max length to get a number spaces.
What I can't work out is how to produce a string that contains 'x' number of spaces, or append those 'x' numbers of spaces to the end of the machine name?