log.h revision e81460af33f230e469cc08aaf68fab71e82b194a
* (Remember to update RT_LOGGROUP_NAMES!) * @remark It should be pretty obvious, but just to have * mentioned it, the values are sorted alphabetically (using the * english alphabet) except for _DEFAULT which is always first. * If anyone might be wondering what the alphabet looks like: * a b c d e f g h i j k l m n o p q r s t u v w x y z /** Default logging group. */ /** @def RT_LOGGROUP_NAMES * IPRT Logging group names. * Must correspond 100% to RTLOGGROUP! * @remark It should be pretty obvious, but just to have * mentioned it, the values are sorted alphabetically (using the * english alphabet) except for _DEFAULT which is always first. * If anyone might be wondering what the alphabet looks like: * a b c d e f g h i j k l m n o p q r s t u v w x y z * Active logging instance. /** @def LOG_REL_INSTANCE * Active release logging instance. * You can use this to specify you desired way of printing __PRETTY_FUNCTION__ * if you dislike the default one. /** Pointer to logger structure. */ /** Pointer to const logger structure. */ /** Guest context logger structure. */ /** Pointer to guest context logger structure. */ /** Pointer to const guest context logger structure. */ * Used for signalling the log header/footer callback what to do. /** Begin of the logging. */ /** End of the logging. */ /** Before rotating the log file. */ /** After rotating the log file. */ /** 32-bit type blow up hack. */ * @param pszFormat Format string. * @param ... Optional arguments as specified in the format string. /** Pointer to logger function. */ * @param pLogger Pointer to the logger instance which is to be flushed. /** Pointer to flush function. */ * @param pLogger Pointer to the logger instance which is to be flushed. /** Pointer to logger function. */ * @param pLogger Pointer to the logger instance. * @param pszFormat Format string. * @param ... Optional arguments specified in the format string. * @param pLogger Pointer to the logger instance. * @param enmLogPhase Indicates at what time the callback is invoked. * @param pfnLogPhaseMsg Callback for writing the header/footer (RTLogPrintf * and others are out of bounds). * Custom log prefix callback. * @returns The number of chars written. * @param pLogger Pointer to the logger instance. * @param pchBuf Output buffer pointer. * No need to terminate the output. * @param cchBuf The size of the output buffer. * @param pvUser The user argument. /** Pointer to prefix callback function. */ * Logger instance structure for raw-mode context (RC). /** Pointer to temporary scratch buffer. * This is used to format the log messages. */ /** Current scratch buffer position. */ /** This is set if a prefix is pending. */ /** Pointer to the logger function. * This is actually pointer to a wrapper which will push a pointer to the * instance pointer onto the stack before jumping to the real logger function. * A very unfortunate hack to work around the missing variadic macro support in C++. */ /** Pointer to the flush function. */ /** Magic number (RTLOGGERRC_MAGIC). */ /** Logger instance flags - RTLOGFLAGS. */ /** Number of groups in the afGroups member. */ /** Group flags array - RTLOGGRPFLAGS. * This member have variable length and may extend way beyond * the declared size of 1 entry. */ /** RTLOGGERRC::u32Magic value. (John Rogers Searle) */ /** Pointer to internal logger bits. */ * Logger instance structure. /** Pointer to temporary scratch buffer. * This is used to format the log messages. */ /** Current scratch buffer position. */ /** Logger instance flags - RTLOGFLAGS. */ /** Destination flags - RTLOGDEST. */ /** Pointer to the internal bits of the logger. * (The memory is allocated in the same block as RTLOGGER.) */ /** Pointer to the logger function (used in non-C99 mode only). * This is actually pointer to a wrapper which will push a pointer to the * instance pointer onto the stack before jumping to the real logger function. * A very unfortunate hack to work around the missing variadic macro * support in older C++/C standards. (The memory is allocated using * RTMemExecAlloc(), except for agnostic R0 code.) */ /** Number of groups in the afGroups and papszGroups members. */ /** Group flags array - RTLOGGRPFLAGS. * This member have variable length and may extend way beyond * the declared size of 1 entry. */ /** RTLOGGER::u32Magic value. (Avram Noam Chomsky) */ /** The logger instance is disabled for normal output. */ /** The logger instance is using buffered output. */ /** The logger instance expands LF to CR/LF. */ /** Append to the log destination where applicable. */ /** Show relative timestamps with PREFIX_TSC and PREFIX_TS */ /** Show decimal timestamps with PREFIX_TSC and PREFIX_TS */ /** Open the file in write through mode. */ /** Flush the file to disk when flushing the buffer. */ /** Restrict the number of log entries per group. */ /** New lines should be prefixed with the write and read lock counts. */ /** New lines should be prefixed with the CPU id (ApicID on intel/amd). */ /** New lines should be prefixed with the native process id. */ /** New lines should be prefixed with group flag number causing the output. */ /** New lines should be prefixed with group flag name causing the output. */ /** New lines should be prefixed with group number. */ /** New lines should be prefixed with group name. */ /** New lines should be prefixed with the native thread id. */ /** New lines should be prefixed with thread name. */ /** New lines should be prefixed with data from a custom callback. */ /** New lines should be prefixed with formatted timestamp since program start. */ /** New lines should be prefixed with formatted timestamp (UCT). */ /** New lines should be prefixed with milliseconds since program start. */ /** New lines should be prefixed with timestamp. */ /** New lines should be prefixed with timestamp. */ * Logger per group flags. /** Restrict the number of log entries. */ * Logger destination type. /** Log to debugger (win32 only). */ /** Log a memory ring buffer. */ /** Just a dummy flag to be used when no other flag applies. */ /** Log to a user defined output stream. */ * Use this compile time define to disable all logging macros. It can * be overridden for each of the logging macros by the LOG_ENABLE* * Use this compile time define to enable logging when not in debug mode * or LOG_DISABLED is set. * This will enabled Log() only. * Use this compile time define to enable flow logging when not in * debug mode or LOG_DISABLED is defined. * This will enable LogFlow() only. * Determine whether logging is enabled and forcefully normalize the indicators. * Governs the use of variadic macros. * Write to specific logger if group enabled. /** @todo invent a flag or something for skipping the group check so we can pass iGroup. LogItAlways. */ * Level 1 logging that works regardless of the group settings. * Logging of execution flow. * The same as Log(), but prepents a <tt>"WARNING! "</tt> string to the message. * @param a Custom log message in format <tt>("string\n" [, args])</tt>. do {
Log((
"WARNING! "));
Log(a); }
while (0)
* Macro to trace the execution flow: logs the file name, line number and * function name. Can be easily searched for in log files using the * ">>>>>" pattern (prepended to the beginning of each line). * The same as LogTrace but logs a custom log message right after the trace line. * @param a Custom log message in format <tt>("string\n" [, args])</tt>. * Level 1 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * Level 2 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * Level 3 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * Level 4 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * Level 5 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * Level 6 logging inside C/C++ functions. * Prepends the given log message with the function name followed by a * @param a Log message in format <tt>("string\n" [, args])</tt>. * The same as LogFunc but for class functions (methods): the resulting log * line is additionally prepended with a hex value of |this| pointer. * @param a Log message in format <tt>("string\n" [, args])</tt>. * Macro to log the execution flow inside C/C++ functions. * Prepends the given log message with the function name followed by * @param a Log message in format <tt>("string\n" [, args])</tt>. * The same as LogWarning(), but prepents the log message with the function name. * @param a Log message in format <tt>("string\n" [, args])</tt>. * The same as LogFlowFunc but for class functions (methods): the resulting log * line is additionally prepended with a hex value of |this| pointer. * @param a Log message in format <tt>("string\n" [, args])</tt>. /** @def LogWarningThisFunc * The same as LogWarningFunc() but for class functions (methods): the resulting * log line is additionally prepended with a hex value of |this| pointer. * @param a Log message in format <tt>("string\n" [, args])</tt>. /** Shortcut to |LogFlowFunc ("ENTER\n")|, marks the beginnig of the function. */ /** Shortcut to |LogFlowFunc ("LEAVE\n")|, marks the end of the function. */ /** Shortcut to |LogFlowFunc ("LEAVE: %Rrc\n")|, marks the end of the function. */ /** Shortcut to |LogFlowThisFunc ("ENTER\n")|, marks the beginnig of the function. */ /** Shortcut to |LogFlowThisFunc ("LEAVE\n")|, marks the end of the function. */ * Helper macro to print the current reference count of the given COM object * @param pObj Pointer to the object in question (must be a pointer to an * IUnknown subclass or simply define COM-style AddRef() and * @note Use it only for temporary debugging. It leaves dummy code even if * Checks whether the specified logging group is enabled or not. * Checks whether level 1 logging is enabled. * Checks whether level 2 logging is enabled. * Checks whether level 3 logging is enabled. * Checks whether level 4 logging is enabled. * Checks whether level 5 logging is enabled. * Checks whether level 6 logging is enabled. /** @def LogIsFlowEnabled * Checks whether execution flow logging is enabled. /** @name Passing Function Call Position When Logging. * This is a little bit ugly as we have to omit the comma before the * position parameters so that we don't inccur any overhead in non-logging * builds (!defined(LOG_ENABLED). /** Source position for passing to a function call. */ /** Source position declaration. */ /** Source position arguments. */ /** Applies NOREF() to the source position arguments. */ /** @name Release Logging /** @def RTLOG_REL_DISABLED * Use this compile time define to disable all release logging /** @def RTLOG_REL_ENABLED * Use this compile time define to override RTLOG_REL_DISABLE. * Determine whether release logging is enabled and forcefully normalize the indicators. * Write to specific logger if group enabled. * Write to specific logger if group enabled and at less than a_cMax messages * have hit the log. Uses a static variable to count. #
else /* !RTLOG_REL_ENABLED */#
endif /* !RTLOG_REL_ENABLED */ * Logging of execution flow. * Release logging. Prepends the given log message with the function name * followed by a semicolon and space. * The same as LogRelFunc but for class functions (methods): the resulting log * line is additionally prepended with a hex value of |this| pointer. * Release logging. Macro to log the execution flow inside C/C++ functions. * Prepends the given log message with the function name followed by * @param a Log message in format <tt>("string\n" [, args])</tt>. * Logging of execution flow. * Release logging. Prepends the given log message with the function name * followed by a semicolon and space. /** @def LogRelMaxThisFunc * The same as LogRelFunc but for class functions (methods): the resulting log * line is additionally prepended with a hex value of |this| pointer. * @param a_cMax Max number of times this should hit the log. * @param a Log message in format <tt>("string\n" [, args])</tt>. /** @def LogRelMaxFlowFunc * Release logging. Macro to log the execution flow inside C/C++ functions. * Prepends the given log message with the function name followed by * @param a_cMax Max number of times this should hit the log. * @param a Log message in format <tt>("string\n" [, args])</tt>. /** @def LogRelIsItEnabled * Checks whether the specified logging group is enabled or not. * Checks whether level 1 logging is enabled. /** @def LogRelIs2Enabled * Checks whether level 2 logging is enabled. /** @def LogRelIs3Enabled * Checks whether level 3 logging is enabled. /** @def LogRelIs4Enabled * Checks whether level 4 logging is enabled. /** @def LogRelIs5Enabled * Checks whether level 5 logging is enabled. /** @def LogRelIs6Enabled * Checks whether level 6 logging is enabled. /** @def LogRelIsFlowEnabled * Checks whether execution flow logging is enabled. * Sets the default release logger instance. * @returns The old default instance. * @param pLogger The new default release logger instance. * Gets the default release logger instance. * @returns Pointer to default release logger instance. * @returns NULL if no default release logger instance available. /** Internal worker function. * Don't call directly, use the LogRelIsItEnabled macro! * Write to a logger instance, defaulting to the release one. * This function will check whether the instance, group and flags makes up a * logging kind which is currently enabled before writing anything to the log. * @param pLogger Pointer to logger instance. * @param fFlags The logging flags. * @param iGroup The group. * The value ~0U is reserved for compatibility with RTLogLogger[V] and is * only for internal usage! * @param pszFormat Format string. * @param ... Format arguments. * @remark This is a worker function for LogRelIt. * Write to a logger instance, defaulting to the release one. * This function will check whether the instance, group and flags makes up a * logging kind which is currently enabled before writing anything to the log. * @param pLogger Pointer to logger instance. If NULL the default release instance is attempted. * @param fFlags The logging flags. * @param iGroup The group. * The value ~0U is reserved for compatibility with RTLogLogger[V] and is * only for internal usage! * @param pszFormat Format string. * @param args Format arguments. * printf like function for writing to the default release log. * @param pszFormat Printf like format string. * @param ... Optional arguments as specified in pszFormat. * @remark The API doesn't support formatting of floating point numbers at the moment. * vprintf like function for writing to the default release log. * @param pszFormat Printf like format string. * @param args Optional arguments as specified in pszFormat. * @remark The API doesn't support formatting of floating point numbers at the moment. * Changes the buffering setting of the default release logger. * This can be used for optimizing longish logging sequences. * @returns The old state. * @param fBuffered The new state. /** @name COM port logging * Redirects the normal logging macros to the serial versions. * Disables all LogCom* macros. * Generic logging to serial port. #
define LogCom(a)
do { }
while (0)
* Logging to serial port of execution flow. /** @name Backdoor Logging * Redirects the normal logging macros to the backdoor versions. * Disables all LogBackdoor* macros. * Generic logging to the VBox backdoor via port I/O. * Logging of execution flow messages to the backdoor I/O port. * Release logging to the VBox backdoor via port I/O. * Gets the default logger instance, creating it if necessary. * @returns Pointer to default logger instance. * @returns NULL if no default logger instance available. * Gets the default logger instance. * @returns Pointer to default logger instance. * @returns NULL if no default logger instance available. * Sets the default logger instance. * @returns The old default instance. * @param pLogger The new default logger instance. * Changes the default logger instance for the current thread. * @returns IPRT status code. * @param pLogger The logger instance. Pass NULL for deregistration. * @param uKey Associated key for cleanup purposes. If pLogger is NULL, * all instances with this key will be deregistered. So in * order to only deregister the instance associated with the /** Internal worker function. * Don't call directly, use the LogIsItEnabled macro! * Creates the default logger instance for a iprt users. * Any user of the logging features will need to implement * this or use the generic dummy. * @returns Pointer to the logger instance. * Create a logger instance. * @returns iprt status code. * @param ppLogger Where to store the logger instance. * @param fFlags Logger instance flags, a combination of the * @param pszGroupSettings The initial group settings. * @param pszEnvVarBase Base name for the environment variables for * @param cGroups Number of groups in the array. * @param papszGroups Pointer to array of groups. This must stick * around for the life of the logger instance. * @param fDestFlags The destination flags. RTLOGDEST_FILE is ORed * if pszFilenameFmt specified. * @param pszFilenameFmt Log filename format string. Standard * @param ... Format arguments. * Create a logger instance. * @returns iprt status code. * @param ppLogger Where to store the logger instance. * @param fFlags Logger instance flags, a combination of the * @param pszGroupSettings The initial group settings. * @param pszEnvVarBase Base name for the environment variables for * @param cGroups Number of groups in the array. * @param papszGroups Pointer to array of groups. This must stick * around for the life of the logger instance. * @param fDestFlags The destination flags. RTLOGDEST_FILE is ORed * if pszFilenameFmt specified. * @param pfnPhase Callback function for starting logging and for * ending or starting a new file for log history * @param cHistory Number of old log files to keep when performing * log history rotation. 0 means no history. * @param cbHistoryFileMax Maximum size of log file when performing * history rotation. 0 means no size limit. * @param cSecsHistoryTimeSlot Maximum time interval per log file when * performing history rotation, in seconds. * @param pszErrorMsg A buffer which is filled with an error message if something fails. May be NULL. * @param cchErrorMsg The size of the error message buffer. * @param pszFilenameFmt Log filename format string. Standard RTStrFormat(). * @param ... Format arguments. * Create a logger instance. * @returns iprt status code. * @param ppLogger Where to store the logger instance. * @param fFlags Logger instance flags, a combination of the * @param pszGroupSettings The initial group settings. * @param pszEnvVarBase Base name for the environment variables for * @param cGroups Number of groups in the array. * @param papszGroups Pointer to array of groups. This must stick * around for the life of the logger instance. * @param fDestFlags The destination flags. RTLOGDEST_FILE is ORed * if pszFilenameFmt specified. * @param pfnPhase Callback function for starting logging and for * ending or starting a new file for log history * @param cHistory Number of old log files to keep when performing * log history rotation. 0 means no history. * @param cbHistoryFileMax Maximum size of log file when performing * history rotation. 0 means no size limit. * @param cSecsHistoryTimeSlot Maximum time interval per log file when * performing history rotation, in seconds. * @param pszErrorMsg A buffer which is filled with an error message * if something fails. May be NULL. * @param cchErrorMsg The size of the error message buffer. * @param pszFilenameFmt Log filename format string. Standard * @param args Format arguments. * Create a logger instance for singled threaded ring-0 usage. * @returns iprt status code. * @param pLogger Where to create the logger instance. * @param cbLogger The amount of memory available for the logger instance. * @param pLoggerR0Ptr The ring-0 address corresponding to @a pLogger. * @param pfnLoggerR0Ptr Pointer to logger wrapper function. * @param pfnFlushR0Ptr Pointer to flush function. * @param fFlags Logger instance flags, a combination of the RTLOGFLAGS_* values. * @param fDestFlags The destination flags. * Calculates the minimum size of a ring-0 logger instance. * @returns The minimum size. * @param cGroups The number of groups. * @param fFlags Relevant flags. * Destroys a logger instance. * The instance is flushed and all output destinations closed (where applicable). * @returns iprt status code. * @param pLogger The logger instance which close destroyed. NULL is fine. * Create a logger instance clone for RC usage. * @returns iprt status code. * @param pLogger The logger instance to be cloned. * @param pLoggerRC Where to create the RC logger instance. * @param cbLoggerRC Amount of memory allocated to for the RC logger * @param pfnLoggerRCPtr Pointer to logger wrapper function for this * @param pfnFlushRCPtr Pointer to flush function (RC Ptr). * @param fFlags Logger instance flags, a combination of the RTLOGFLAGS_* values. * Flushes a RC logger instance to a R3 logger. * @returns iprt status code. * @param pLogger The R3 logger instance to flush pLoggerRC to. If NULL * the default logger is used. * @param pLoggerRC The RC logger instance to flush. * Flushes the buffer in one logger instance onto another logger. * @returns iprt status code. * @param pSrcLogger The logger instance to flush. * @param pDstLogger The logger instance to flush onto. * If NULL the default logger will be used. * Flushes a R0 logger instance to a R3 logger. * @returns iprt status code. * @param pLogger The R3 logger instance to flush pLoggerR0 to. If NULL * the default logger is used. * @param pLoggerR0 The R0 logger instance to flush. * Sets the custom prefix callback. * @returns IPRT status code. * @param pLogger The logger instance. * @param pfnCallback The callback. * @param pvUser The user argument for the callback. * Same as RTLogSetCustomPrefixCallback for loggers created by * @returns IPRT status code. * @param pLogger The logger instance. * @param pLoggerR0Ptr The ring-0 address corresponding to @a pLogger. * @param pfnCallbackR0Ptr The callback. * @param pvUserR0Ptr The user argument for the callback. * Copies the group settings and flags from logger instance to another. * @returns IPRT status code. * @param pDstLogger The destination logger instance. * @param pDstLoggerR0Ptr The ring-0 address corresponding to @a pDstLogger. * @param pSrcLogger The source logger instance. If NULL the default one is used. * @param fFlagsOr OR mask for the flags. * @param fFlagsAnd AND mask for the flags. * Get the current log group settings as a string. * @returns VINF_SUCCESS or VERR_BUFFER_OVERFLOW. * @param pLogger Logger instance (NULL for default logger). * @param pszBuf The output buffer. * @param cchBuf The size of the output buffer. Must be greater * Updates the group settings for the logger instance using the specified * @returns iprt status code. * Failures can safely be ignored. * @param pLogger Logger instance (NULL for default logger). * @param pszValue Value to parse. * Updates the flags for the logger instance using the specified * @returns iprt status code. * Failures can safely be ignored. * @param pLogger Logger instance (NULL for default logger). * @param pszValue Value to parse. * Changes the buffering setting of the specified logger. * This can be used for optimizing longish logging sequences. * @returns The old state. * @param pLogger The logger instance (NULL is an alias for the * @param fBuffered The new state. * Sets the max number of entries per group. * @returns Old restriction. * @param pLogger The logger instance (NULL is an alias for the * @param cMaxEntriesPerGroup The max number of entries per group. * @remarks Lowering the limit of an active logger may quietly mute groups. * Raising it may reactive already muted groups. * Get the current log flags as a string. * @returns VINF_SUCCESS or VERR_BUFFER_OVERFLOW. * @param pLogger Logger instance (NULL for default logger). * @param pszBuf The output buffer. * @param cchBuf The size of the output buffer. Must be greater * Updates the logger destination using the specified string. * @returns VINF_SUCCESS or VERR_BUFFER_OVERFLOW. * @param pLogger Logger instance (NULL for default logger). * @param pszValue The value to parse. * Get the current log destinations as a string. * @returns VINF_SUCCESS or VERR_BUFFER_OVERFLOW. * @param pLogger Logger instance (NULL for default logger). * @param pszBuf The output buffer. * @param cchBuf The size of the output buffer. Must be greater * Flushes the specified logger. * @param pLogger The logger instance to flush. * If NULL the default instance is used. The default instance * will not be initialized by this call. * Write to a logger instance. * @param pLogger Pointer to logger instance. * @param pvCallerRet Ignored. * @param pszFormat Format string. * @param ... Format arguments. * Write to a logger instance. * @param pLogger Pointer to logger instance. * @param pszFormat Format string. * @param args Format arguments. * Write to a logger instance. * This function will check whether the instance, group and flags makes up a * logging kind which is currently enabled before writing anything to the log. * @param pLogger Pointer to logger instance. If NULL the default logger instance will be attempted. * @param fFlags The logging flags. * @param iGroup The group. * The value ~0U is reserved for compatibility with RTLogLogger[V] and is * only for internal usage! * @param pszFormat Format string. * @param ... Format arguments. * @remark This is a worker function of LogIt. * Write to a logger instance. * This function will check whether the instance, group and flags makes up a * logging kind which is currently enabled before writing anything to the log. * @param pLogger Pointer to logger instance. If NULL the default logger instance will be attempted. * @param fFlags The logging flags. * @param iGroup The group. * The value ~0U is reserved for compatibility with RTLogLogger[V] and is * only for internal usage! * @param pszFormat Format string. * @param args Format arguments. * printf like function for writing to the default log. * @param pszFormat Printf like format string. * @param ... Optional arguments as specified in pszFormat. * @remark The API doesn't support formatting of floating point numbers at the moment. * vprintf like function for writing to the default log. * @param pszFormat Printf like format string. * @param args Optional arguments as specified in pszFormat. * @remark The API doesn't support formatting of floating point numbers at the moment. * Dumper vprintf-like function outputting to a logger. * @param pvUser Pointer to the logger instance to use, NULL for * @param pszFormat Format string. * @param va Format arguments. * @returns number of bytes written. * @param pvArg User argument. * @param pachChars Pointer to an array of utf-8 characters. * @param cbChars Number of bytes in the character array pointed to by pachChars. /** Pointer to callback function. */ * Partial vsprintf worker implementation. * @returns number of bytes formatted. * @param pfnOutput Output worker. * Called in two ways. Normally with a string an it's length. * For termination, it's called with NULL for string, 0 for length. * @param pvArg Argument to output worker. * @param pszFormat Format string. * @param args Argument list. * Write log buffer to COM port. * @param pach Pointer to the buffer to write. * @param cb Number of bytes to write. * Prints a formatted string to the serial port used for logging. * @returns Number of bytes written. * @param pszFormat Format string. * @param ... Optional arguments specified in the format string. * Prints a formatted string to the serial port used for logging. * @returns Number of bytes written. * @param pszFormat Format string. * @param args Optional arguments specified in the format string. #
if 0
/* not implemented yet *//** Indicates that the semaphores shall be used to notify the other * part about buffer changes. */ * Use to communicate between the logger and a log consumer. /** Buffer end (exclusive). */ /** Signaling semaphore used by the writer to wait on a full buffer. * Only used when indicated in flags. */ /** Signaling semaphore used by the read to wait on an empty buffer. * Only used when indicated in flags. */ /** Buffer flags. Current reserved and set to zero. */ /** Pointer to a log hook buffer. */ * Register a logging hook. * This type of logging hooks are expecting different threads acting * producer and consumer. They share a circular buffer which have two * pointers one for each end. When the buffer is full there are two * alternatives (indicated by a buffer flag), either wait for the * consumer to get it's job done, or to write a generic message saying * Since the waiting would need a signal semaphore, we'll skip that for now. * @returns iprt status code. * @param pBuffer Pointer to a logger hook buffer. * Deregister a logging hook registered with RTLogRegisterHook(). * @returns iprt status code. * @param pBuffer Pointer to a logger hook buffer. #
endif /* not implemented yet */ * Write log buffer to a debugger (RTLOGDEST_DEBUGGER). * @param pach What to write. * @param cb How much to write. * @remark When linking statically, this function can be replaced by defining your own. * Write log buffer to a user defined output stream (RTLOGDEST_USER). * @param pach What to write. * @param cb How much to write. * @remark When linking statically, this function can be replaced by defining your own. * Write log buffer to stdout (RTLOGDEST_STDOUT). * @param pach What to write. * @param cb How much to write. * @remark When linking statically, this function can be replaced by defining your own. * Write log buffer to stdout (RTLOGDEST_STDERR). * @param pach What to write. * @param cb How much to write. * @remark When linking statically, this function can be replaced by defining your own. * Prints a formatted string to the backdoor port. * @returns Number of bytes written. * @param pszFormat Format string. * @param ... Optional arguments specified in the format string. * Prints a formatted string to the backdoor port. * @returns Number of bytes written. * @param pszFormat Format string. * @param args Optional arguments specified in the format string.