Index: trunk/MagicSoft/Cosy/candrv/nodedrv.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 8823)
+++ trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 8835)
@@ -52,4 +52,5 @@
 #include "MTime.h"
 #include "network.h"
+
 #include "MLogManip.h"
 
@@ -65,9 +66,9 @@
 // and the node name. The name is a name for debug output.
 //
-NodeDrv::NodeDrv(BYTE_t nodeid, const char *name, MLog &out) : Log(out), fNetwork(NULL), fId(32), fError(0), fIsZombie(kTRUE), fGuard(NULL)
+NodeDrv::NodeDrv(BYTE_t nodeid, const char *name) : fNetwork(NULL), fId(32), fError(0), fIsZombie(kTRUE), fGuard(NULL)
 {
     if (nodeid>0x1f)
     {
-        cout << "SetNode - Error: Only node Numbers < 32 are allowed"<< endl;
+        gLog << err << "ERROR - NodeDrv::NodeDrv: Only node Numbers < 32 are allowed"<< endl;
         return;
     }
@@ -83,5 +84,5 @@
     }
 
-    lout << "- Node #" << (int)nodeid << " (" << name << ") initialized." << endl;
+    gLog << inf2 << "- Node #" << (int)nodeid << " (" << name << ") initialized." << endl;
 
 }
@@ -149,15 +150,15 @@
 void NodeDrv::HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, const timeval_t &tv)
 {
-    const Bool_t gui = lout.IsOutputDeviceEnabled(MLog::eGui);
+    const Bool_t gui = gLog.IsOutputDeviceEnabled(MLog::eGui);
 
     if (gui)
-        lout << ddev(MLog::eGui);
-
-    lout << hex << setfill('0');
-    lout << "Node #" << dec << (int)fId << ": Sdo=" << hex << idx  << "/" << (int)subidx << " set.";
-    lout << endl;
+        gLog << ddev(MLog::eGui);
+
+    gLog << warn << setfill('0') << "WARNING - Nodedrv::HandleSDOOK: ";
+    gLog << "Node #" << dec << (int)fId << ": Sdo=" << hex << idx  << "/" << (int)subidx << " set.";
+    gLog << endl;
 
     if (gui)
-        lout << edev(MLog::eGui);
+        gLog << edev(MLog::eGui);
 }
 
@@ -168,7 +169,7 @@
 void NodeDrv::HandleSDOError(LWORD_t data)
 {
-    lout << "Nodedrv: SDO Error: Entry not found in dictionary (data=0x";
-    lout << hex << setfill('0') << setw(4) << data << ")";
-    lout << endl;
+    gLog << warn << "WARNING - Nodedrv::HandleSDOError: Entry not found in dictionary (data=0x";
+    gLog << hex << setfill('0') << setw(4) << data << ")";
+    gLog << endl;
 }
 
@@ -179,6 +180,6 @@
 void NodeDrv::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv)
 {
-    cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx;
-    cout << ", val=0x" << val << endl;
+    gLog << warn << "WARNING - Nodedrv::HandleSDO: Idx=0x"<< hex << idx << "/" << (int)subidx;
+    gLog << ", val=0x" << val << endl;
 }
 
@@ -426,5 +427,5 @@
         return true;
 
-    lout << " + " << GetNodeName() << ": NodeDrv::WaitForSdo: 0x" << hex << idx << "/" << dec << (int)subidx << " --> ZOMBIE! " << MTime(-1) << endl;
+    gLog << inf2 << " + " << GetNodeName() << ": NodeDrv::WaitForSdo: 0x" << hex << idx << "/" << dec << (int)subidx << " --> ZOMBIE! " << MTime(-1) << endl;
     if (zombie)
         SetZombie();
@@ -555,6 +556,6 @@
     fGuard->RunThread();
 
-    lout << "- " << GetNodeName() << ": Guarding (" << dec;
-    lout << fLifeTimeFactor << "*" << fGuardTime << "ms) started." << endl;
+    gLog << inf << "- " << GetNodeName() << ": Guarding (" << dec;
+    gLog << fLifeTimeFactor << "*" << fGuardTime << "ms) started." << endl;
 }
 
@@ -563,5 +564,5 @@
     if (fGuard)
     {
-        lout << "- " << GetNodeName() << ": ERROR - Guarding already started." << endl;
+        gLog << err << "- " << GetNodeName() << ": ERROR - Guarding already started." << endl;
         return;
     }
@@ -581,5 +582,5 @@
     fGuard=NULL;
 
-    lout << "- " << GetNodeName() << ": Guarding stopped." << endl;
+    gLog << inf << "- " << GetNodeName() << ": Guarding stopped." << endl;
 }
 
@@ -601,4 +602,4 @@
         StopGuarding();
     else
-        lout << " - " << GetNodeName() << ": Zombie set due to timeout." << endl;
-}
+        gLog << warn << " - " << GetNodeName() << ": Zombie set due to timeout." << endl;
+}
