mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
virtiofsd: use virtiofsd --syslog
Log to syslog instead of stderr. This way all Kata and virtiofsd logs are captured in syslog (or the systemd journal). This makes debugging much easier. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
d5a3d0a61c
commit
23a5dc7ff8
@ -611,7 +611,8 @@ func (q *qemu) virtiofsdArgs(fd uintptr) []string {
|
||||
args := []string{
|
||||
fmt.Sprintf("--fd=%v", fd),
|
||||
"-o", "source=" + sourcePath,
|
||||
"-o", "cache=" + q.config.VirtioFSCache}
|
||||
"-o", "cache=" + q.config.VirtioFSCache,
|
||||
"--syslog"}
|
||||
if q.config.Debug {
|
||||
args = append(args, "-d")
|
||||
} else {
|
||||
|
@ -502,12 +502,12 @@ func TestQemuVirtiofsdArgs(t *testing.T) {
|
||||
kataHostSharedDir = savedKataHostSharedDir
|
||||
}()
|
||||
|
||||
result := "--fd=123 -o source=test-share-dir/foo -o cache=none -d"
|
||||
result := "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -d"
|
||||
args := q.virtiofsdArgs(123)
|
||||
assert.Equal(strings.Join(args, " "), result)
|
||||
|
||||
q.config.Debug = false
|
||||
result = "--fd=123 -o source=test-share-dir/foo -o cache=none -f"
|
||||
result = "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -f"
|
||||
args = q.virtiofsdArgs(123)
|
||||
assert.Equal(strings.Join(args, " "), result)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user