socket_vmnet
socket_vmnet copied to clipboard
WIP: Improve logging
This is a quick draft to experiment with better logging. Posting to get an early review on this changes.
This does not fix all the issues mentioned in #43 but prepare the infrastructure. With these changes adding timestamps for all logs is a trivial change.
Example log with this change
# tail -f /var/log/socket_vmnet/stderr
INFO | Initializing vmnet.framework (mode 1001)
INFO | * vmnet_subnet_mask: 255.255.255.0
INFO | * vmnet_mtu: 1500
INFO | * vmnet_end_address: 192.168.105.254
INFO | * vmnet_start_address: 192.168.105.1
INFO | * vmnet_interface_id: 9EF22956-C8DF-4242-8239-150985812E89
INFO | * vmnet_max_packet_size: 1514
INFO | * vmnet_nat66_prefix: fd9b:5a14:ba57:e3d3::
INFO | * vmnet_mac_address: 26:42:48:f0:96:21
INFO | Accepted a connection (fd 5)
INFO | Closing a connection (fd 5)
INFO | Received signal: Broken pipe: 13
ERROR| writev: Broken pipe