- In order to use it generitically, It is implemented to get every data as a parameter and not process it inside the function. It just properly formatted and printed formatted string to the log file.
- It is possible to initialize log file, when it started through Initialize.cpp. But that is not included in the requested file for submission. So It just appends text in the log file without initialization.
- Althoguh shedule logger needs mutex because of function runing in the different thread, my logger is not executed in the multi threading or multi processing condition. So I'm not using mutex.
- I interpreted the time in the format as the time for the real cyber system. And It May not be sequentially in the simulation, and the purpose of this logger is to check whether the task read and write data properlly, So I did not write log in sorted order.
- I interpreted the data length to the total size of the data structure for reading and writing data from physical device. Because system reads and writes data at a time, rather than reading or writing only some data considering the specification of task.
I put logger in two points.
- First is between after read data from Tagged Data and before run job.
- Second is after write data to the Delayed Data.
So we can check the read and written data is proper when the job is executed. If every raw data is empty, there are issues about connection. If any log are not leaved, Maybe there are issues about scheduling. But in this case we need more information to confirm the reason.
- I used priority_queue to print log in ascending order, For time.
- It is possible to initialize log file, when it started through Initialize.cpp. But that is not included in the requested file for submission.
- I set the job id similar to the format. J is attached as a prefix as a job, and expected first integer is a task id and the second integer is a job id.
Maybe the best place to put logger should be ScheduleGenerator. when is_released or is_started is the best chance to log. But that is not included in the requested file for submission. So I cannot choose this way.
I checked that jobs miss deadline are simulated as a run_job in the Executor::run_simulation(). So although there are logging part about missing deadline in the front of function, I integrated all logging where after simulating the job.
When there are FINISHED event, there are scheduling issue. or not there are no scheduling issue.