Direct trousers logging to the syslog.

BUG=chromium:379657
TEST=manual

Change-Id: Id47e756d16c9c697d0c970bf4e85ab67048b63b6
Reviewed-on: https://chromium-review.googlesource.com/202451
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
diff --git a/src/include/tcslog.h b/src/include/tcslog.h
index 28ff511..f7b25de 100644
--- a/src/include/tcslog.h
+++ b/src/include/tcslog.h
@@ -93,16 +93,9 @@
 #define LogBlob(sz,blb)
 #define LogDebugKey(s)
 #define LogDebugUnrollKey(b)
-
-/* Error logging */
-#define LogError(fmt, ...)	LogMessage(stderr, LOG_ERR, APPID, "ERROR: " fmt, ##__VA_ARGS__)
-
-/* Warn logging */
-#define LogWarn(fmt, ...)	LogMessage(stdout, LOG_WARNING, APPID, fmt, ##__VA_ARGS__)
-
-/* Info Logging */
-#define LogInfo(fmt, ...)	LogMessage(stdout, LOG_INFO, APPID, fmt, ##__VA_ARGS__)
-
+#define LogError(fmt, ...) syslog(LOG_ERR, "TSS: " fmt, ##__VA_ARGS__)
+#define LogWarn(fmt, ...) syslog(LOG_WARNING, "TSS: " fmt, ##__VA_ARGS__)
+#define LogInfo(fmt, ...) syslog(LOG_INFO, "TSS: " fmt, ##__VA_ARGS__)
 #define LogTPMERR(a,b,c)
 #endif
 
diff --git a/src/include/tsplog.h b/src/include/tsplog.h
index 502b540..2b636d0 100644
--- a/src/include/tsplog.h
+++ b/src/include/tsplog.h
@@ -53,9 +53,9 @@
 #define LogDebug(fmt, ...)
 #define LogDebugFn(fmt, ...)
 #define LogDebugData(sz,blb)
-#define LogError(fmt, ...)
-#define LogWarn(fmt, ...)
-#define LogInfo(fmt, ...)
+#define LogError(fmt, ...) syslog(LOG_ERR, "TSS: " fmt, ##__VA_ARGS__)
+#define LogWarn(fmt, ...) syslog(LOG_WARNING, "TSS: " fmt, ##__VA_ARGS__)
+#define LogInfo(fmt, ...) syslog(LOG_INFO, "TSS: " fmt, ##__VA_ARGS__)
 #define LogTrace()
 #endif