]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
[Bug 51] Changed - About the way HylaFAX logs to syslog
authorDarren Nickerson <darren.nickerson@ifax.com>
Sat, 2 Feb 2002 19:55:46 +0000 (19:55 +0000)
committerDarren Nickerson <darren.nickerson@ifax.com>
Sat, 2 Feb 2002 19:55:46 +0000 (19:55 +0000)
Applied Guilio's patch which tidies up some long-standing annoyances.
-dpn

faxd/FaxMachineLog.c++
faxd/FaxSend.c++
faxd/faxGettyApp.c++
hfaxd/FileSystem.c++

index 9c67dc068fa46563beae697ebce32e8bdd89ca35..dc28cc506a70ab2134779ce8fae9823ad4080662 100644 (file)
@@ -46,6 +46,7 @@ FaxMachineLog::FaxMachineLog(int f, const fxStr& number, const fxStr& commid)
     fd = f;
     pid = getpid();
     log("SESSION BEGIN %s %s", (const char*) commid, (const char*) canon);
+    log("%s", HYLAFAX_VERSION);
 }
 
 FaxMachineLog::~FaxMachineLog()
index 933d29beb10f6c9d809e51c784e0a8a61cc4cc60..4cf13b92073c4d0b0fffe85684a1ea7cf24011d7 100644 (file)
@@ -45,14 +45,13 @@ FaxServer::sendFax(FaxRequest& fax, FaxMachineInfo& clientInfo, FaxAcctInfo& ai)
     u_int prevPages = fax.npages;
     if (lockModem()) {
        beginSession(fax.number);
-       traceServer("%s", HYLAFAX_VERSION);
        fax.commid = getCommID();               // set by beginSession
-       traceServer("SEND FAX: JOB %s DEST %s COMMID %s"
+       traceServer("SEND FAX: JOB %s DEST %s COMMID %s DEVICE '%s'"
            , (const char*) fax.jobid
            , (const char*) fax.external
            , (const char*) fax.commid
+           , (const char*) getModemDevice()
        );
-       traceServer("DEVICE '%s'", (const char*) getModemDevice());
        if (setupModem()) {
            changeState(SENDING);
            IOHandler* handler =
@@ -698,6 +697,10 @@ FaxServer::notifyDocumentSent(FaxRequest& req, u_int fi)
        , (const char*) freq.item
        , fmtTime(getFileTransferTime())
     );
+    logInfo("SEND FAX: JOB %s SENT in %s"
+       , (const char*) req.jobid
+       , fmtTime(getFileTransferTime())
+    );
     if (freq.op == FaxRequest::send_fax)
        req.renameSaved(fi);
     req.requests.remove(fi);
index b07ab891fe75f74bcf9d048a76a0e2bee43ae80d..ec0202a12e2d32702dbb769b465ceac1da8edb4b 100644 (file)
@@ -108,7 +108,10 @@ faxGettyApp::initialize(int argc, char** argv)
 void
 faxGettyApp::open()
 {
-    traceServer("OPEN " | getModemDevice());
+    traceServer("OPEN %s  %s"
+        , (const char*) getModemDevice()
+        , HYLAFAX_VERSION
+    );
     faxApp::open();
     FaxServer::open();
 }
@@ -446,7 +449,9 @@ faxGettyApp::processCall(CallType ctype, fxStr& emsg, const CallerID& cid)
 
     switch (ctype) {
     case ClassModem::CALLTYPE_FAX:
-       traceServer("ANSWER: FAX CONNECTION");
+       traceServer("ANSWER: FAX CONNECTION  DEVICE '%s'"
+           , (const char*) getModemDevice()
+       );
        changeState(RECEIVING);
        sendRecvStatus(getModemDeviceID(), "B");
        callHandled = recvFax(cid);
index 42c7a10aeedf96e9b23da43b0387c0487a00430e..cb2cf8433e96f853394cd82aeddd32784f227544 100644 (file)
@@ -387,7 +387,7 @@ HylaFAXServer::setFileOwner(const char* file)
             state &= ~S_SETGID;                        // set by OS, no work to do
         }
         if (TRACE(SERVER)) {
-            logInfo("Filesystem has %s-style file creation semantics.",
+            logDebug("Filesystem has %s-style file creation semantics.",
                 IS(SETGID) ? "BSD" : "SysV");
         }
         state &= ~S_CHECKGID;