Prints a debug message to the debug output device if the specified error level is enabled. If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function GetDebugPrintErrorLevel (), then print the message specified by Format and the associated variable argument list to the debug output device. If Format is NULL, then ASSERT(). @param ErrorLevel The error level of the debug
| 42 | based on the format string specified by Format. |
| 43 | **/ |
| 44 | VOID |
| 45 | EFIAPI |
| 46 | DebugPrint ( |
| 47 | IN UINTN ErrorLevel, |
| 48 | IN CONST CHAR8 *Format, |
| 49 | ... |
| 50 | ) |
| 51 | { |
| 52 | VA_LIST Marker; |
| 53 | CHAR16 Buffer[256]; |
| 54 | OC_LOG_PROTOCOL *OcLog; |
| 55 | |
| 56 | ASSERT (Format != NULL); |
| 57 | |
| 58 | OcLog = InternalGetOcLog (); |
| 59 | |
| 60 | VA_START (Marker, Format); |
| 61 | |
| 62 | if (OcLog != NULL) { |
| 63 | OcLog->AddEntry (OcLog, ErrorLevel, Format, Marker); |
| 64 | } else if ((ErrorLevel & GetDebugPrintErrorLevel ()) != 0) { |
| 65 | UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker); |
| 66 | gST->ConOut->OutputString (gST->ConOut, Buffer); |
| 67 | } |
| 68 | |
| 69 | VA_END (Marker); |
| 70 | } |
| 71 | |
| 72 | |
| 73 | /** |
no test coverage detected