* the product should have the dependency, not an underlying library.
*
* In complex cases, where an "InitWith" is not sufficient and Log_AddOutput
- * must be used directly, the client should call Log_SetProductInfo, passing
- * the appropriate parameters, so the log file header information will be
- * correct.
+ * must be used directly, the client must call Log_SetProductInfo2, passing
+ * the appropriate parameters, so the logging information will be correct
+ * (e.g. log file header, syslog transmissions).
+ *
+ * The original Log_SetProductInfo continues to exist for compatiblity with
+ * ancient iofilters. It should not be used.
*/
void
const char *buildNumber,
const char *compilationOption);
+void
+Log_SetProductInfo2(const char *appName,
+ const char *appVersion,
+ const char *buildNumber,
+ const char *compilationOption,
+ const char *sdCompId);
+
+#if defined(VMX86_SERVER)
+#define VMW_LOG_DEFAULT_SD_COMP_ID "esx"
+#elif defined (__APPLE__)
+#define VMW_LOG_DEFAULT_SD_COMP_ID "fusion"
+#else
+#define VMW_LOG_DEFAULT_SD_COMP_ID "ws"
+#endif
+
+#if !defined(VMW_LOG_SET_SD_COMP_ID)
+#define VMW_LOG_SET_SD_COMP_ID VMW_LOG_DEFAULT_SD_COMP_ID
+#endif
+
static INLINE void
Log_SetProductInfoSimple(void)
{
- Log_SetProductInfo(ProductState_GetName(),
- ProductState_GetVersion(),
- ProductState_GetBuildNumberString(),
- ProductState_GetCompilationOption());
+ Log_SetProductInfo2(ProductState_GetName(),
+ ProductState_GetVersion(),
+ ProductState_GetBuildNumberString(),
+ ProductState_GetCompilationOption(),
+ VMW_LOG_SET_SD_COMP_ID);
}
LogOutput *