Skip to content

Commit

Permalink
Merge pull request #67 from kairos-io/debug-logger
Browse files Browse the repository at this point in the history
Show debug log in netbooting
  • Loading branch information
jimmykarily authored Oct 14, 2024
2 parents 5e963f9 + a0427a8 commit 9ca30fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/netboot/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func Server(kernel, bootmsg, cmdline string, address, httpPort string, initrds [
return err
}

logger := func(subsystem, msg string) { log.Printf("%s: %s\n", subsystem, msg) }

ipxeFw := map[pixiecore.Firmware][]byte{}
ipxeFw[pixiecore.FirmwareX86PC] = ipxe.MustAsset("third_party/ipxe/src/bin/undionly.kpxe")
ipxeFw[pixiecore.FirmwareEFI32] = ipxe.MustAsset("third_party/ipxe/src/bin-i386-efi/ipxe.efi")
Expand All @@ -39,7 +41,8 @@ func Server(kernel, bootmsg, cmdline string, address, httpPort string, initrds [
ipxeFw[pixiecore.FirmwareX86Ipxe] = ipxe.MustAsset("third_party/ipxe/src/bin/ipxe.pxe")
s := &pixiecore.Server{
Ipxe: ipxeFw,
Log: func(subsystem, msg string) { log.Printf("%s: %s\n", subsystem, msg) },
Log: logger,
Debug: logger,
HTTPPort: port,
HTTPStatusPort: 0,
DHCPNoBind: nobind,
Expand Down

0 comments on commit 9ca30fc

Please sign in to comment.