Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the vmm_task's log output format #37

Closed
flyflypeng opened this issue Jun 29, 2023 · 1 comment
Closed

Optimize the vmm_task's log output format #37

flyflypeng opened this issue Jun 29, 2023 · 1 comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@flyflypeng
Copy link
Member

What should be cleaned up or changed?

Currently, vmm_task's log is redirected into the host by vmm-sandboxer process.
However, vmm-sandboxer process just use the debug!() macro to print the vmm_task's logs into the stdout, which will add the redundant log header like this:

 [2023-06-27T07:24:46.160098Z DEBUG vmm_sandboxer::utils] console: [2023-06-27T07:24:45.531189Z DEBUG vmm_task::task] receive exit event: PID 87 exit with code 0                    
[2023-06-27T07:24:46.160198Z DEBUG vmm_sandboxer::utils] console: [2023-06-27T07:24:45.531308Z DEBUG vmm_task::io] copy_io: pipe stdout from to hvsock://vsock:2000                 
[2023-06-27T07:24:46.161295Z DEBUG vmm_sandboxer::utils] console: [2023-06-27T07:24:45.532399Z INFO  containerd_shim::asynchronous::task] Create request for b3fdff9ae24160e1fd21a36c6e87af6a47c4cd49a300100867aeae86390c1c63 returns pid 96               

What we want to achieve like this:

[2023-06-27T07:24:45.531189Z DEBUG vmm_task::task] receive exit event: PID 87 exit with code 0 
[2023-06-27T07:24:45.531308Z DEBUG vmm_task::io] copy_io: pipe stdout from to hvsock://vsock:2000 
[2023-06-27T07:24:45.532399Z INFO  containerd_shim::asynchronous::task] Create request for b3fdff9ae24160e1fd21a36c6e87af6a47c4cd49a300100867aeae86390c1c63 returns pid 96

Why is this needed?

Remove the redundant log header for vmm_task components log, make a more cleaner log output!

@flyflypeng flyflypeng added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jun 29, 2023
@flyflypeng
Copy link
Member Author

This #33 issue also optimizes the kuasar log output, current issue can be optimized in the same PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

1 participant