summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-06-10 12:03:05 +0200
committerDanny Baumann <dannybaumann@web.de>2007-06-10 12:03:05 +0200
commit73aef48bf773c121b9de0a48af6c773fe4bb9b5c (patch)
treeda3845a5e8aca566300d3ac7b9f7f660e82f7c02
parentd4f6f3ba0cd57900dd8218d1815342dfa1528d14 (diff)
downloadscreencasting-73aef48bf773c121b9de0a48af6c773fe4bb9b5c.tar.gz
screencasting-73aef48bf773c121b9de0a48af6c773fe4bb9b5c.tar.bz2
printf -> compLogMessage.
-rw-r--r--plugin/screencasting.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugin/screencasting.c b/plugin/screencasting.c
index b7d1fdb..37f919f 100644
--- a/plugin/screencasting.c
+++ b/plugin/screencasting.c
@@ -123,7 +123,8 @@ secondThread(void* screen)
if (!f)
{
- fprintf(stderr, "Error opening file. Will not screencast.\n");
+ compLogMessage (s->display, "screencasting", CompLogLevelError,
+ "Error opening file. Will not screencast.");
pthread_mutex_lock(&cs->errorLock);
@@ -226,9 +227,9 @@ castInitiate (CompDisplay *d,
pthread_mutex_unlock(&cs->errorLock); // We don't want a deadlock.
rc = pthread_join(cs->secondThread, NULL); // Wait for second thread to complete it's operation.
- if (rc) {
- fprintf(stderr, "Screencasting: pthread_join() failed. Return code is %d\n", rc);
- }
+ if (rc)
+ compLogMessage (s->display, "screencasting", CompLogLevelError,
+ "pthread_join() failed. Return code is %d.", rc);
}
else
@@ -258,8 +259,9 @@ castInitiate (CompDisplay *d,
cs->casting = FALSE;
freeQueue(cs->frameQueue);
cs->frameQueue = NULL;
-
- fprintf(stderr, "Screencasting: Could not start a new thread (error code: %d). Will not screencast.\n", rc);
+
+ compLogMessage (s->display, "screencasting", CompLogLevelError,
+ "Could not start a new thread (error code: %d). Will not screencast.", rc);
}
else
damageScreen(s); // We need to damage the screen to get a screenshot of first frame.
@@ -497,9 +499,9 @@ castFiniScreen (CompPlugin *p,
pthread_mutex_unlock(&cs->errorLock); // We don't want a deadlock.
rc = pthread_join(cs->secondThread, NULL); // Wait for second thread to complete it's operation.
- if (rc) {
- fprintf(stderr, "Screencasting: pthread_join() failed. Return code is %d\n", rc);
- }
+ if (rc)
+ compLogMessage (s->display, "screencasting", CompLogLevelError,
+ "pthread_join() failed. Return code is %d.", rc);
}
else
pthread_mutex_unlock(&cs->errorLock);