Need basic code changed to add debug output to a txt file.
Existing code is for a linux based vnc repeater is compiled using 'make' command on linux server, and creates output to the screen, using 'debug'.
I need all output also added to a log file as follows :
Log file name will be located in the /logs path.
The log file name will be "log_ccyymmdd" ( ccyymmdd = todays date )
each entry in the log file should be formatted as follows :
ccyymmdd hh:mm:ss xxxxxx text
where : ccyymmdd = date
hh:mm:ss = time
xxxxxx = IDcode of connection (session ID)
text = copy of debug text
Additional code must also be added that logs all traffic passing through the router for each active IDcode, in the format :
ccyymmdd hh:mm:ss xxxxxx direction bytes
where : direction = > ( svr to viewer ) or < ( viewer to svr )
bytes = the size of the data passing through.
All code changes MUST be clearly marked and commented.