Replace logging trough pexpect with realtime logging
Problem with logging trough pexpect is that we log output only when we expect it. That is when we access it trough pexpect. This means that time and synchronization when logs arrive from multiple sources can't be archived and only one source logs at the time (the one that is used currently by pexpect). This is not ideal as we are interested in situation such as restarting network interfaces that produce some logs not only on router but also in container at the same time. Synchronization on time bases in such cases is important and we can't wait for code to call pexpect to print it to logs later on. This instead utilizes sockets and by reading source immediately and just passing it to socket.
Please register or sign in to comment