This function is not in the Juke_Box custom server, it is included here as a suggestion for an extension to the custom server.
When playing music you may want to keep statistics of how often each piece of music is played.
You can change the Juke_Box custom server to add a record to a file each time a juke_box_start_music command is received. The file name can be a parameter sent to the custom server when it starts.
When the custom server starts, it can open the copyright log file.
When the custom server stops, the copyright log file should be closed.
Each time a juke_box_start_music request is received from the state table, the Juke_Box custom server could do the following:
fprintf(file, music title) - to print the name to the music title into the file.
fflush() - to make sure the music title is sent to the disk.
You can write a script to collect and collate these statistics.