Skip to content

Add -v/--verbose flag to control trace output#479

Open
Jino26 wants to merge 1 commit intoDMTF:mainfrom
Jino26:verbose_option
Open

Add -v/--verbose flag to control trace output#479
Jino26 wants to merge 1 commit intoDMTF:mainfrom
Jino26:verbose_option

Conversation

@Jino26
Copy link
Contributor

@Jino26 Jino26 commented Feb 16, 2026

Introduce EMU_LOG, EMU_ERR & EMU_INFO logging macros gated by a new m_verbose flag. By default only errors and essential messages are shown; passing -v or --verbose restores full platform traces and hex dumps. All printf() calls in spdm_requester_emu & spdm_responder_emu are converted to the appropriate macro.

Feature #478

Introduce EMU_LOG, EMU_ERR & EMU_INFO logging macros gated by a new
m_verbose flag. By default only errors and essential messages are
shown; passing -v or --verbose restores full platform traces and hex
dumps. All printf() calls in spdm_requester_emu & spdm_responder_emu
are converted to the appropriate macro.

Feature DMTF#478

Signed-off-by: Jino Abraham <[email protected]>
@Jino26
Copy link
Contributor Author

Jino26 commented Feb 17, 2026

Test results:

Without verbose option (only errors & essential traces printed):

$ ./spdm_responder_emu
ERROR: receive_platform_data Error - 2
ERROR: Server Critical Error - STOP
SPDM Responder server stopped

With verbose option:

$ ./spdm_responder_emu -v
spdm_responder_emu version 0.1
context_size - 0x2f10
Platform server listening on port 2323
Platform port Receive command: 00 00 de ad
Platform port Receive transport_type: 00 00 00 01
Platform port Receive size: 00 00 00 0e

Combined with other options:

./spdm_responder_emu -v --trans TCP
trans - 0x3
spdm_responder_emu version 0.1
context_size - 0x2f10
Platform server listening on port 4194
Platform port Receive command: 00 00 de ad
Platform port Receive transport_type: 00 00 00 03
Platform port Receive size: 00 00 00 0e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant