Index: trunk/MagicSoft/Cosy/candrv/network.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/network.cc	(revision 8831)
+++ trunk/MagicSoft/Cosy/candrv/network.cc	(revision 8835)
@@ -32,6 +32,6 @@
 #include "network.h"
 
-#include <iostream> // cout
-#include <iomanip>  // setw, setfill
+#include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(Network);
@@ -46,10 +46,10 @@
 void Network::Start()
 {
-    gLog << "- Starting network." << endl;
+    gLog << inf << "- Starting network." << endl;
 
     CanOpen::Start();
     InitNodes();
 
-    gLog << "- Network started." << endl;
+    gLog << inf << "- Network started." << endl;
 }
 
@@ -60,10 +60,10 @@
 void Network::Stop()
 {
-    gLog << "- Stopping network." << endl;
+    gLog << inf << "- Stopping network." << endl;
 
     StopNodes();
     CanOpen::Stop();
 
-    gLog << "- Network stopped." << endl;
+    gLog << inf << "- Network stopped." << endl;
 }
 
@@ -77,5 +77,5 @@
     memset(fNodeInitialized, 0, 32*sizeof(*fNodeInitialized));
 
-    gLog << "- Network initialized." << endl;
+    gLog << inf << "- Network initialized." << endl;
 }
 
@@ -115,8 +115,8 @@
         }
 
-    cout << dec << setfill('0');
-    cout << "Network::HandleSDO: Node=" << (int)node  << " Cmd=0x" << hex << (int)cmd << ": ";
-    cout << "Sdo=" << idx  << "/" << (int)subidx << ": 0x" << setw(8) << data;
-    cout << endl;
+    gLog << warn << dec << setfill('0');
+    gLog << "Network::HandleSDO: Node=" << (int)node  << " Cmd=0x" << hex << (int)cmd << ": ";
+    gLog << "Sdo=" << idx  << "/" << (int)subidx << ": 0x" << setw(8) << data;
+    gLog << endl;
 }
 
@@ -129,8 +129,8 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandlePDO1: Node #" << dec << (int)node << " not found - PDO1: " << hex;
+        gLog << err << "ERROR - Network::HandlePDO1: Node #" << dec << (int)node << " not found - PDO1: " << hex;
         for (int i=0; i<8; i++)
-            cout << " 0x" << (int)data[i];
-        cout << endl;
+            gLog << " 0x" << (int)data[i];
+        gLog << endl;
         return;
     }
@@ -147,8 +147,8 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandlePDO2: Node #" << dec << (int)node << " not found - PDO2: " << hex;
+        gLog << err << "ERROR - Network::HandlePDO2: Node #" << dec << (int)node << " not found - PDO2: " << hex;
         for (int i=0; i<8; i++)
-            cout << " 0x" << (int)data[i];
-        cout << endl;
+            gLog << " 0x" << (int)data[i];
+        gLog << endl;
         return;
     }
@@ -165,8 +165,8 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandlePDO3: Node #" << dec << (int)node << " not found - PDO3: " << hex;
+        gLog << err << "ERROR - Network::HandlePDO3: Node #" << dec << (int)node << " not found - PDO3: " << hex;
         for (int i=0; i<8; i++)
-            cout << " 0x" << (int)data[i];
-        cout << endl;
+            gLog << " 0x" << (int)data[i];
+        gLog << endl;
         return;
     }
@@ -183,8 +183,8 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandlePDO4: Node #" << dec << (int)node << " not found - PDO4: " << hex;
+        gLog << err << "ERROR - Network::HandlePDO4: Node #" << dec << (int)node << " not found - PDO4: " << hex;
         for (int i=0; i<8; i++)
-            cout << " 0x" << (int)data[i];
-        cout << endl;
+            gLog << " 0x" << (int)data[i];
+        gLog << endl;
         return;
     }
@@ -202,5 +202,5 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandleNodeguard: Node #" << dec << (int)node << " not found: Nodeguard." << endl;
+        gLog << err << "ERROR - Network::HandleNodeguard: Node #" << dec << (int)node << " not found: Nodeguard." << endl;
         return;
     }
@@ -218,5 +218,5 @@
     if (!fNodes[node])
     {
-        cout << "Network::HandleEmergency: Node #" << dec << (int)node << " not found: Emergency." << endl;
+        gLog << err << "ERROR - Network::HandleEmergency: Node #" << dec << (int)node << " not found: Emergency." << endl;
         return;
     }
@@ -236,5 +236,5 @@
     if (nodeid>31)
     {
-        cout << "SetNode - Error: Only node Numbers < 32 are allowed"<< endl;
+        gLog << err << "ERROR - Network::SetNode: Only node Numbers < 32 are allowed"<< endl;
         return;
     }
@@ -252,12 +252,12 @@
         if (fNodes[i])
         {
-            gLog << "- Setting up Node #" << dec << i << " (";
+            gLog << inf2 << "- Setting up Node #" << dec << i << " (";
             gLog << fNodes[i]->GetNodeName() << ")" << endl;
             if (fNodes[i]->InitDevice(this))
                 fNodeInitialized[i] = TRUE;
             else
-                gLog << "- " << fNodes[i]->GetNodeName() << ": InitDevice failed." << endl;
+                gLog << err << "- " << fNodes[i]->GetNodeName() << ": InitDevice failed." << endl;
         }
-    gLog << "- All Nodes setup." << endl;
+    gLog << inf << "- All Nodes setup." << endl;
 }
 
@@ -271,9 +271,9 @@
         if (fNodes[i] && fNodeInitialized[i])
         {
-            gLog << "- Stopping Node #" << dec << i;
+            gLog << inf2 << "- Stopping Node #" << dec << i;
             gLog << " (" << fNodes[i]->GetNodeName() << ")" << endl;
             fNodes[i]->StopDevice();
         }
-    gLog << "- All Nodes stopped." << endl;
+    gLog << inf << "- All Nodes stopped." << endl;
 }
 
@@ -292,5 +292,5 @@
             continue;
 
-        gLog << "- Node #" << dec << i << " '" << fNodes[i]->GetNodeName() << "' ";
+        gLog << err << "- Node #" << dec << i << " '" << fNodes[i]->GetNodeName() << "' ";
 
         if (fNodes[i]->GetError() <= 0)
@@ -362,6 +362,6 @@
                 }
 
-    if (rc)
-        gLog << "- All Zombies rebooted." << endl;
+//    if (rc)
+//        gLog << inf << "- All Zombies rebooted." << endl;
 
     return rc;
Index: trunk/MagicSoft/Cosy/candrv/network.h
===================================================================
--- trunk/MagicSoft/Cosy/candrv/network.h	(revision 8831)
+++ trunk/MagicSoft/Cosy/candrv/network.h	(revision 8835)
@@ -42,5 +42,5 @@
     bool HasZombie() const;
 
-    bool RebootZombies();
+    bool RebootZombies(Int_t max=33);
     void CheckConnections();
 
Index: trunk/MagicSoft/Cosy/candrv/nodedrv.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 8831)
+++ 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;
+}
Index: trunk/MagicSoft/Cosy/candrv/nodedrv.h
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.h	(revision 8831)
+++ trunk/MagicSoft/Cosy/candrv/nodedrv.h	(revision 8835)
@@ -4,8 +4,4 @@
 #ifndef ROOT_TString
 #include <TString.h>
-#endif
-
-#ifndef COSY_Log
-#include "log.h"
 #endif
 
@@ -25,5 +21,5 @@
 class NodeGuard;
 
-class NodeDrv : public Log
+class NodeDrv
 {
 private:
@@ -50,5 +46,5 @@
 
 public:
-    NodeDrv(BYTE_t nodeid, const char *name=NULL, MLog &out=gLog);
+    NodeDrv(BYTE_t nodeid, const char *name=NULL);
     virtual ~NodeDrv();
 
