Serial question

So I am going to use Gobetwino to store readings from the analog pins in a text file. to get the readings to be processed by gobetwino i have to conver the numbers to string. Here is an example of how to do it if your numbers are up to 4 digits

char buffer[5];

Serial.print("#S|LOGTEST|[");
Serial.print(itoa((value1), buffer, 10));
Serial.print(";");

So i understand the char buffer is 5 because the analog read returns a value of up to 4 digits (between 1 and 1024) so you need one extra for the /0 or whatever. But I am also going to try to store the time of each reading in the text file by using the millis() function. So in the beggining the millis will need a buffer of 2 and by the end it will need a buffer of 7. can I just change the buffer to 7 and everything will just work out. and what does the 10 after buffer mean.

The 10 is the base of your number system. Other usual values are 8 or 16. For a long you need a buffer of 11 bytes (10 for the digits and one for the 0 at the end).