Skip to content

Provide an option to disable the transmission of logs to the serial console. #570

@agokarn

Description

@agokarn

Logging is initiated in main using Intel’s td_logger crate.
let _ = td_logger::init();

When log::info is called in MigTD rust code, it makes it way to the hypervisor as output on the serial port. Call flow –
log::info!("message")
↓ (macro expansion)
log::log!(Level::Info, "message")
↓ (calls registered logger)
LoggerBackend::log(&record)
↓ (calls td-logger internal)
tdlog!("{} - {}", level, args)
↓ (calls logger backend)
_log_ex(level, mask, format_args)
↓ (writes formatted string)
dbg_write_string(formatted_message)
↓ (writes each byte)
dbg_port_write(byte)
↓ (TDX hypercall)
tdvmcall_io_write_8(0x3F8, byte)
↓ (appears in)
Serial Console Output

is there a feature or a command line option to disable logging to the serial console in td_logger?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions