Bereinige die Logs
Logdateien enthalten normalerweise Zeitstempel, die angeben, wann ein Ereignis aufgetreten ist, sowie Log-Level (INFO, TRACE, ERROR). Deine Aufgabe ist es, diese Informationen zu bereinigen, sodass nur noch das Wesentliche übrig bleibt.
log.txt
enthält die unbereinigten Logs.Das Programm soll die bereinigten Logs im Output ausgeben.
log.txt
03/22 08:51:01 INFO :...locate_configFile: Specified configuration file: /u/user10/rsvpd1.conf
03/22 08:51:01 INFO :.main: Using log level 511
03/22 08:51:01 INFO :..settcpimage: Get TCP images rc - EDC8112I Operation not supported on socket.
03/22 08:51:01 INFO :..settcpimage: Associate with TCP/IP image name = TCPCS
03/22 08:51:02 INFO :..reg_process: registering process with the system
03/22 08:51:02 INFO :..reg_process: attempt OS/390 registration
03/22 08:51:02 INFO :..reg_process: return from registration rc=0
03/22 08:51:06 TRACE :...read_physical_netif: Home list entries returned = 7
03/22 08:51:06 INFO :...read_physical_netif: index #0, interface VLINK1 has address 129.1.1.1, ifidx 0
03/22 08:51:06 INFO :...read_physical_netif: index #1, interface TR1 has address 9.37.65.139, ifidx 1
03/22 08:51:06 INFO :...read_physical_netif: index #2, interface LINK11 has address 9.67.100.1, ifidx 2
03/22 08:51:06 INFO :...read_physical_netif: index #3, interface LINK12 has address 9.67.101.1, ifidx 3
Output
:...locate_configFile: Specified configuration file: /u/user10/rsvpd1.conf
:.main: Using log level 511
:..settcpimage: Get TCP images rc - EDC8112I Operation not supported on socket.
:..settcpimage: Associate with TCP/IP image name = TCPCS
:..reg_process: registering process with the system
:..reg_process: attempt OS/390 registration
:..reg_process: return from registration rc=0
:...read_physical_netif: Home list entries returned = 7
:...read_physical_netif: index #0, interface VLINK1 has address 129.1.1.1, ifidx 0
:...read_physical_netif: index #1, interface TR1 has address 9.37.65.139, ifidx 1
:...read_physical_netif: index #2, interface LINK11 has address 9.67.100.1, ifidx 2
:...read_physical_netif: index #3, interface LINK12 has address 9.67.101.1, ifidx 3
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB