Writes a formatted message to the installer's log file. The message appears in the installer's log file prefixed with message code TSU:I0065, like this:
00072040|TSU:I0065|xxxx|yyyyyyyyyyyyyyyy|Message text
The xxxx portion represents the hexadecimal language code in which the installer operates; yyyyyyyyyyyyyyyy is the internal object ID of the installer itself. The maximum length of the formatted message is a little less than 1024 characters.
void LogMessage(
const TCHAR *pszFormat,
...
);
none
The formatting specification is similar to that used by printf. It consists of a text string that contains literal text interspersed with formatting specifiers. Each formatting specifier starts with a % (percent) sign and must be matched with a corresponding argument to the right of pszFormat (except for the literal percent character inserted by %%). It must use the following syntax:
%[-][#][0][,][width][.precision][size]type
The options must appear in the order shown and have the following meaning. Options within [brackets] are optional.
| Option | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| % | Signals the start of a format specification. To insert a literal '%' character, use two in sequence: %% | ||||||||||||||||||||||||
| - | Left-align the formatted data within its field width | ||||||||||||||||||||||||
| # | Add a prefix or padding: # padding for types a, s, w; # prefix for type p; 0x prefix for x and X types. | ||||||||||||||||||||||||
| 0 | Zero-pad the data to its field width (overrides # for types a, s, w). If neither # nor 0 is specified, the field is padded with spaces if necessary to achive the minimum width. | ||||||||||||||||||||||||
| , | Insert thousands separators for types d, i, and u. The thousands separator follows the locale conventions of the current user. | ||||||||||||||||||||||||
| width | Decimal number that specifies the minimum formatted field width. Padding uses 0, #, or spaces, depending on the earlier options. | ||||||||||||||||||||||||
| .precision | Decimal number that specifies the maximum formatted width (for types d, i, u, x and X) or the maximum number of characters to copy (for types a, s, w). | ||||||||||||||||||||||||
| size | Data size modifier for types d, i, u,
x and X; may be one of the following:
|
||||||||||||||||||||||||
| type | Data type specifier; may be one of the following:
All other type characters cause TWUDebugPrintf to exit immediately. |