diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-10 02:03:33 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-10 02:03:33 +0000 |
commit | 6764949dc7fa9f7b7c0aeaf228122608d65d4312 (patch) | |
tree | 6bda457b496de65d2579e14dab6e2432945616c8 /common | |
parent | dab9a56916295b79e2c00382e4096428a1714136 (diff) | |
download | tigervnc-6764949dc7fa9f7b7c0aeaf228122608d65d4312.tar.gz tigervnc-6764949dc7fa9f7b7c0aeaf228122608d65d4312.zip |
Replaced printf(...) and fprintf(stderr, ...) with proper logging.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2356 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common')
-rw-r--r-- | common/rfb/IrixDMIC_RawToJpeg.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/common/rfb/IrixDMIC_RawToJpeg.cxx b/common/rfb/IrixDMIC_RawToJpeg.cxx index b3378a78..9e2de542 100644 --- a/common/rfb/IrixDMIC_RawToJpeg.cxx +++ b/common/rfb/IrixDMIC_RawToJpeg.cxx @@ -4,9 +4,12 @@ #include <sys/poll.h> #include <rfb/IrixDMIC_RawToJpeg.h> +#include <rfb/LogWriter.h> using namespace rfb; +static LogWriter vlog("IrixDMIC_RawToJpeg"); + // // Constructor. Find a converter and create a context. Also, create // DMparams structures for using with dmICSetSrcParams, @@ -46,7 +49,7 @@ IrixDMIC_RawToJpeg::IrixDMIC_RawToJpeg(bool needRealtime) // FIXME: Just save the engine name and make x0vncserver print it. const char *engine = dmParamsGetString(p, DM_IC_ENGINE); - printf("Found JPEG encoder: \"%s\" (%d)\n", engine, n); + vlog.info("Found JPEG encoder: \"%s\" (%d)", engine, n); dmParamsDestroy(p); break; @@ -55,7 +58,7 @@ IrixDMIC_RawToJpeg::IrixDMIC_RawToJpeg(bool needRealtime) } if (n < 0) { // FIXME: Unify error handling. - fprintf (stderr, "Error: No matching JPEG encoder found\n"); + vlog.error("Error: No matching JPEG encoder found"); return; } if (dmICCreate(n, &m_ic) != DM_SUCCESS) { @@ -433,8 +436,8 @@ IrixDMIC_RawToJpeg::reportError(const char *funcName) { char errorDetail[DM_MAX_ERROR_DETAIL]; const char *errorCategory = dmGetError(NULL, errorDetail); - fprintf(stderr, "%s() failed: %s: %s\n", - funcName, errorCategory, errorDetail); + vlog.error("%s() failed: %s: %s", + funcName, errorCategory, errorDetail); } // @@ -444,6 +447,6 @@ IrixDMIC_RawToJpeg::reportError(const char *funcName) void IrixDMIC_RawToJpeg::reportErrorNotInited() { - fprintf(stderr, "Internal error: Image converter not initialized\n"); + vlog.error("Internal error: Image converter not initialized"); } |