Index: code/branches/output/src/libraries/network/ChatListener.cc
===================================================================
--- code/branches/output/src/libraries/network/ChatListener.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/ChatListener.cc	(revision 8807)
@@ -40,5 +40,5 @@
       //unsigned int senderID )
     //{
-      //COUT(0) << "Chat: \"" << message << "\"\n";
+      //orxout(message) << "Chat: \"" << message << "\"" << endl;
 
 
Index: code/branches/output/src/libraries/network/Client.cc
===================================================================
--- code/branches/output/src/libraries/network/Client.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/Client.cc	(revision 8807)
@@ -118,5 +118,5 @@
   bool Client::processChat(const std::string& message, unsigned int playerID)
   {
-//    COUT(1) << "Player " << playerID << ": " << message << std::endl;
+//    orxout(message) << "Player " << playerID << ": " << message << endl;
     return true;
   }
@@ -124,5 +124,5 @@
   void Client::printRTT()
   {
-    COUT(0) << "Round trip time to server is " << ClientConnection::getRTT() << " ms" << endl;
+    orxout(message) << "Round trip time to server is " << ClientConnection::getRTT() << " ms" << endl;
   }
 
@@ -150,8 +150,7 @@
     {
       timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
-      //     COUT(3) << '.';
       if ( isConnected() && isSynched_ )
       {
-        COUT(4) << "popping partial gamestate: " << std::endl;
+        orxout(verbose, context::network) << "popping partial gamestate: " << endl;
 //         packet::Gamestate *gs = GamestateClient::getGamestate();
         if( GamestateManager::update() )
@@ -166,7 +165,7 @@
         //assert(gs); <--- there might be the case that no data has to be sent, so its commented out now
 //         if(gs){
-//           COUT(4) << "client tick: sending gs " << gs << std::endl;
+//           orxout(verbose, context::network) << "client tick: sending gs " << gs << endl;
 //           if( !gs->send() )
-//             COUT(2) << "Problem adding partial gamestate to queue" << std::endl;
+//             orxout(internal_warning, context::network) << "Problem adding partial gamestate to queue" << endl;
 //         // gs gets automatically deleted by enet callback
 //         }
Index: code/branches/output/src/libraries/network/ClientConnection.cc
===================================================================
--- code/branches/output/src/libraries/network/ClientConnection.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/ClientConnection.cc	(revision 8807)
@@ -60,5 +60,5 @@
   void ClientConnection::setServerAddress( const std::string& serverAddress ) {
     if (enet_address_set_host (this->serverAddress_, serverAddress.c_str()) < 0)
-        COUT(1) << "Error: Could not resolve \"" << serverAddress << "\"." << std::endl;
+        orxout(internal_error, context::network) << "Could not resolve \"" << serverAddress << "\"." << endl;
   }
 
@@ -76,5 +76,5 @@
     if ( this->host_ == NULL )
     {
-      COUT(1) << "ClientConnection: host_ == NULL" << std::endl;
+      orxout(internal_error, context::network) << "ClientConnection: host_ == NULL" << endl;
       // error handling
       return false;
@@ -86,14 +86,14 @@
     assert( this->host_->socket4 != ENET_SOCKET_NULL || this->host_->socket6 != ENET_SOCKET_NULL );
     if (this->host_->socket4 == ENET_SOCKET_NULL)
-        COUT(2) << "Warning: IPv4 Socket failed." << std::endl;
+        orxout(internal_warning, context::network) << "IPv4 Socket failed." << endl;
     else if (this->host_->socket6 == ENET_SOCKET_NULL)
-        COUT(2) << "Warning: IPv6 Socket failed." << std::endl;
+        orxout(internal_warning, context::network) << "IPv6 Socket failed." << endl;
     else
-        COUT(3) << "Info: Using IPv4 and IPv6 Sockets." << std::endl;
+        orxout(internal_info, context::network) << "Using IPv4 and IPv6 Sockets." << endl;
 
     this->server_ = enet_host_connect(this->host_, serverAddress_, NETWORK_CHANNEL_COUNT, 0);
     if ( this->server_==NULL )
     {
-      COUT(1) << "ClientConnection: server_ == NULL" << std::endl;
+      orxout(internal_error, context::network) << "ClientConnection: server_ == NULL" << endl;
       // error handling
       return false;
@@ -113,5 +113,5 @@
       }
     }
-    COUT(1) << "Could not connect to server" << endl;
+    orxout(user_error, context::network) << "Could not connect to server" << endl;
     return false;
   }
@@ -140,5 +140,5 @@
             break;
           case ENET_EVENT_TYPE_DISCONNECT:
-            COUT(4) << "received disconnect confirmation from server" << endl;
+            orxout(verbose, context::network) << "received disconnect confirmation from server" << endl;
             this->connectionClosed();
             return true;
@@ -167,5 +167,5 @@
   {
     this->established_=false;
-    COUT(1) << "Received disconnect Packet from Server!" << endl;
+    orxout(internal_error, context::network) << "Received disconnect Packet from Server!" << endl;
         // server closed the connection
     this->stopCommunicationThread();
Index: code/branches/output/src/libraries/network/Connection.cc
===================================================================
--- code/branches/output/src/libraries/network/Connection.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/Connection.cc	(revision 8807)
@@ -144,5 +144,5 @@
       while( outgoingEventsCount > 0 )
       {
-//         COUT(0) << "outgoing event" << endl;
+//         orxout(verbose, context::network) << "outgoing event" << endl;
         this->outgoingEventsMutex_->lock();
         outgoingEvent outEvent = this->outgoingEvents_.front();
Index: code/branches/output/src/libraries/network/GamestateManager.cc
===================================================================
--- code/branches/output/src/libraries/network/GamestateManager.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/GamestateManager.cc	(revision 8807)
@@ -128,10 +128,10 @@
     if( !this->sendPacket(ack))
     {
-      COUT(3) << "could not ack gamestate: " << gamestateID << std::endl;
+      orxout(internal_warning, context::network) << "could not ack gamestate: " << gamestateID << endl;
       return false;
     }
     else
     {
-      COUT(5) << "acked a gamestate: " << gamestateID << std::endl;
+      orxout(verbose_more, context::network) << "acked a gamestate: " << gamestateID << endl;
       return true;
     }
@@ -182,9 +182,9 @@
       if( !peerIt->second.isSynched )
       {
-        COUT(5) << "Server: not sending gamestate" << std::endl;
+        orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
         continue;
       }
-      COUT(5) << "client id: " << peerIt->first << std::endl;
-      COUT(5) << "Server: doing gamestate gamestate preparation" << std::endl;
+      orxout(verbose_more, context::network) << "client id: " << peerIt->first << endl;
+      orxout(verbose_more, context::network) << "Server: doing gamestate gamestate preparation" << endl;
       int peerID = peerIt->first; //get client id
 
@@ -256,10 +256,10 @@
 //     OrxVerify(gs->compressData(), "");
     clock.capture();
-    COUT(5) << "diff and compress time: " << clock.getDeltaTime() << endl;
-//     COUT(5) << "sending gamestate with id " << gs->getID();
+    orxout(verbose_more, context::network) << "diff and compress time: " << clock.getDeltaTime() << endl;
+//     orxout(verbose_more, context::network) << "sending gamestate with id " << gs->getID();
 //     if(gamestate->isDiffed())
-//       COUT(5) << " and baseid " << gs->getBaseID() << endl;
+//       orxout(verbose_more, context::network) << " and baseid " << gs->getBaseID() << endl;
 //     else
-//       COUT(5) << endl;
+//       orxout(verbose_more, context::network) << endl;
     gs->setPeerID(peerID);
     destgamestate = gs;
@@ -291,5 +291,5 @@
     if( gamestateID <= curid && curid != GAMESTATEID_INITIAL )
         return true;
-COUT(4) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << std::endl;
+orxout(verbose, context::network) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << endl;
     std::map<uint32_t, packet::Gamestate*>::iterator it2;
     for( it2=it->second.gamestates.begin(); it2!=it->second.gamestates.end(); )
Index: code/branches/output/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/branches/output/src/libraries/network/LANDiscoverable.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/LANDiscoverable.cc	(revision 8807)
@@ -71,5 +71,5 @@
       this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 );
       if ( this->host_ == NULL )
-          COUT(1) << "LANDiscoverable: host_ == NULL" << std::endl;
+          orxout(internal_error, context::network) << "LANDiscoverable: host_ == NULL" << endl;
     }
     else
@@ -94,5 +94,5 @@
       {
         case ENET_EVENT_TYPE_CONNECT:
-            COUT(4) << "Received LAN discovery connect from client " << event.peer->host->receivedAddress << std::endl;
+            orxout(verbose, context::network) << "Received LAN discovery connect from client " << event.peer->host->receivedAddress << endl;
             break;
         case ENET_EVENT_TYPE_DISCONNECT:
@@ -102,5 +102,5 @@
           if( strcmp( LAN_DISCOVERY_MESSAGE, (char*)event.packet->data ) == 0 )      // check for a suitable orxonox client
           {
-            COUT(3) << "Received LAN discovery message from client " << event.peer->host->receivedAddress << std::endl;
+            orxout(internal_info, context::network) << "Received LAN discovery message from client " << event.peer->host->receivedAddress << endl;
             packet::ServerInformation info;
             info.setServerName("Orxonox Server");
Index: code/branches/output/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/branches/output/src/libraries/network/LANDiscovery.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/LANDiscovery.cc	(revision 8807)
@@ -44,5 +44,5 @@
     this->host_ = enet_host_create(NULL, 10, 0, 0, 0 );
     if ( this->host_ == NULL )
-        COUT(1) << "LANDiscovery: host_ == NULL" << std::endl;
+        orxout(internal_error, context::network) << "LANDiscovery: host_ == NULL" << endl;
   }
 
@@ -66,5 +66,5 @@
     peer = enet_host_connect(this->host_, &address, 0, 0);
     if (peer == NULL)
-        COUT(1) << "Error: Could not send LAN discovery to IPv4 Broadcast." << std::endl;
+        orxout(internal_error, context::network) << "Could not send LAN discovery to IPv4 Broadcast." << endl;
 
     /* IPv6 */
@@ -72,5 +72,5 @@
     peer = enet_host_connect(this->host_, &address, 0, 0);
     if (peer == NULL)
-        COUT(1) << "Error: Could not send LAN discovery to IPv6 Multicast." << std::endl;
+        orxout(internal_error, context::network) << "Could not send LAN discovery to IPv6 Multicast." << endl;
 
     ENetEvent event;
@@ -81,5 +81,5 @@
         case ENET_EVENT_TYPE_CONNECT:
         {
-          COUT(4) << "Received LAN discovery connect from server " << event.peer->host->receivedAddress << std::endl;
+          orxout(verbose, context::network) << "Received LAN discovery connect from server " << event.peer->host->receivedAddress << endl;
           ENetPacket* packet = enet_packet_create(LAN_DISCOVERY_MESSAGE, strlen(LAN_DISCOVERY_MESSAGE)+1, ENET_PACKET_FLAG_RELIABLE);
           enet_peer_send(event.peer, 0, packet);
@@ -89,5 +89,5 @@
           {
             packet::ServerInformation info(&event);
-            COUT(3) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", RTT: " << info.getServerRTT() << endl;
+            orxout(internal_info, context::network) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", RTT: " << info.getServerRTT() << endl;
             std::vector<packet::ServerInformation>::iterator it;
             for( it=this->servers_.begin(); it!=this->servers_.end(); ++it )
Index: code/branches/output/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/output/src/libraries/network/MasterServer.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/MasterServer.cc	(revision 8807)
@@ -38,5 +38,6 @@
   helper_output_debug( ENetEvent *event, char *addrconv )
   {
-    COUT(4) << "A packet of length" 
+    orxout(verbose, context::master_server)
+      << "A packet of length" 
       << event->packet->dataLength
       << " containing "
@@ -45,5 +46,5 @@
       << addrconv 
       << " on channel "
-      << event->channelID << "\n";
+      << event->channelID << endl;
   }
 
@@ -66,5 +67,5 @@
           + MSPROTO_SERVERLIST_ITEM_LEN + 2,1 );
       if( !tosend ) 
-      { COUT(2) << "Masterserver.cc: Memory allocation failed.\n";
+      { orxout(internal_warning, context::master_server) << "Masterserver.cc: Memory allocation failed." << endl;
         continue;
       } 
@@ -108,5 +109,5 @@
   { /* check for bad parameters */
     if( !event )
-    { COUT(2) << "MasterServer::eventConnect: No event given.\n" ;
+    { orxout(internal_warning, context::master_server) << "MasterServer::eventConnect: No event given." << endl;
       return -1;
     }
@@ -117,8 +118,8 @@
 
     /* output debug info */
-    COUT(4) << "A new client connected from " 
+    orxout(verbose, context::master_server) << "A new client connected from " 
       << addrconv 
       << " on port " 
-      << event->peer->address.port << "\n";
+      << event->peer->address.port << endl;
 
     /* store string form of address here */
@@ -134,10 +135,10 @@
   { /* check for bad parameters */
     if( !event )
-    { COUT(2) << "No event given.\n";
+    { orxout(internal_warning, context::master_server) << "No event given." << endl;
       return -1;
     }
 
     /* output that the disconnect happened */
-    COUT(4) << (char*)event->peer->data << " disconnected.\n";
+    orxout(verbose, context::master_server) << (char*)event->peer->data << " disconnected." << endl;
 
     /* create string from peer data */
@@ -159,5 +160,5 @@
   { /* validate packet */
     if( !event || !(event->packet) || !(event->peer) )
-    { COUT(2) << "No complete event given.\n";
+    { orxout(internal_warning, context::master_server) << "No complete event given." << endl;
       return -1;
     }
@@ -182,6 +183,6 @@
         
         /* tell people we did so */
-        COUT(2) << "Added new server to list: " << 
-          packet::ServerInformation( event ).getServerIP() << "\n";
+        orxout(internal_info, context::master_server) << "Added new server to list: " << 
+          packet::ServerInformation( event ).getServerIP() << endl;
       }
 
@@ -197,5 +198,5 @@
 
         /* tell the user */
-        COUT(2) << "Removed server " << name << " from list.\n";
+        orxout(internal_info, context::master_server) << "Removed server " << name << " from list." << endl;
       }
 
@@ -230,5 +231,5 @@
     if( event == NULL )
     { 
-      COUT(1) << "Could not create ENetEvent structure, exiting.\n";
+      orxout(user_error, context::master_server) << "Could not create ENetEvent structure, exiting." << endl;
       exit( EXIT_FAILURE );
     }
@@ -263,5 +264,5 @@
     /***** INITIALIZE NETWORKING *****/
     if( enet_initialize () != 0)
-    { COUT(1) << "An error occurred while initializing ENet.\n";
+    { orxout(user_error, context::master_server) << "An error occurred while initializing ENet." << endl;
       exit( EXIT_FAILURE );
     }
@@ -285,6 +286,6 @@
     /* see if creation worked */
     if( !this->server )
-    { COUT(1) << 
-        "An error occurred while trying to create an ENet server host.\n";
+    { orxout(user_error, context::master_server) << 
+        "An error occurred while trying to create an ENet server host." << endl;
       exit( EXIT_FAILURE );
     }
@@ -294,5 +295,5 @@
 
     /* tell people we're now initialized */
-    COUT(0) << "MasterServer initialized, waiting for connections.\n";
+    orxout(internal_status, context::master_server) << "MasterServer initialized, waiting for connections." << endl;
   }
 
Index: code/branches/output/src/libraries/network/MasterServerComm.cc
===================================================================
--- code/branches/output/src/libraries/network/MasterServerComm.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/MasterServerComm.cc	(revision 8807)
@@ -44,5 +44,5 @@
     /* initialize Enet */
     if( enet_initialize () != 0 )
-    { COUT(1) << "An error occurred while initializing ENet.\n";
+    { orxout(internal_error, context::master_server) << "An error occurred while initializing ENet." << endl;
       return 1;
     }
@@ -61,6 +61,6 @@
     /* see if it worked */
     if (this->client == NULL)
-    { COUT(1) << "An error occurred while trying to create an " 
-        << "ENet client host.\n";
+    { orxout(internal_error, context::master_server) << "An error occurred while trying to create an " 
+        << "ENet client host." << endl;
       return 1;
     }
@@ -85,6 +85,6 @@
 
     if( this->peer == NULL )
-    { COUT(2) << "ERROR: No available peers for initiating an ENet"
-        << " connection.\n";
+    { orxout(internal_error, context::master_server) << "No available peers for initiating an ENet"
+        << " connection." << endl;
       return -1;
     }
@@ -93,9 +93,9 @@
     if (enet_host_service (this->client, &this->event, 500) > 0 &&
         this->event.type == ENET_EVENT_TYPE_CONNECT )
-      COUT(3) << "Connection to master server succeeded.\n";
+      orxout(internal_info, context::master_server) << "Connection to master server succeeded." << endl;
     else
     {
       enet_peer_reset (this->peer);
-      COUT(2) << "ERROR: connection to " << address << " failed.\n";
+      orxout(internal_warning, context::master_server) << "Connection to " << address << " failed." << endl;
       return -1;
     }
@@ -128,5 +128,5 @@
 
         case ENET_EVENT_TYPE_DISCONNECT:
-          COUT(4) << "Disconnect from master server successful.\n"; 
+          orxout(verbose, context::master_server) << "Disconnect from master server successful." << endl; 
           return 0;
         default: break;
@@ -154,5 +154,5 @@
     /* see whether anything happened */
     /* WORK MARK REMOVE THIS OUTPUT */
-    COUT(2) << "polling masterserver...\n";
+    orxout(verbose, context::master_server) << "polling masterserver..." << endl;
 
     /* address buffer */
@@ -176,5 +176,5 @@
           addrconv = (char *) calloc( 50, 1 );
           if( !addrconv ) 
-          { COUT(2) << "MasterServerComm.cc: Could not allocate memory!\n";
+          { orxout(internal_warning, context::master_server) << "MasterServerComm.cc: Could not allocate memory!" << endl;
             break;
           }
@@ -185,5 +185,5 @@
 
           /* DEBUG */
-          COUT(3) << "MasterServer Debug: A packet of length " 
+          orxout(verbose, context::master_server) << "MasterServer Debug: A packet of length " 
             << this->event.packet->dataLength 
             << " containing " << this->event.packet->data
Index: code/branches/output/src/libraries/network/PeerList.cc
===================================================================
--- code/branches/output/src/libraries/network/PeerList.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/PeerList.cc	(revision 8807)
@@ -40,5 +40,5 @@
   { /* error correction */
     if( toadd == NULL ) 
-    { fprintf( stderr, "PeerList::addPeer: empty peer given.\n" );
+    { orxout(internal_error, context::master_server) << "PeerList::addPeer: empty peer given." << endl;
       return -1;
     }
Index: code/branches/output/src/libraries/network/Server.cc
===================================================================
--- code/branches/output/src/libraries/network/Server.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/Server.cc	(revision 8807)
@@ -114,5 +114,5 @@
   {
     Host::setActive(true);
-    COUT(4) << "opening server" << endl;
+    orxout(verbose, context::network) << "opening server" << endl;
     this->openListener();
     
@@ -137,12 +137,12 @@
   {
     Host::setActive(false);
-    COUT(4) << "closing server" << endl;
+    orxout(verbose, context::network) << "closing server" << endl;
     this->disconnectClients();
     this->closeListener();
 
     /* tell master server we're closing */
-    COUT(2) << "disconnecting." << endl;
+    orxout(internal_info, context::network) << "disconnecting." << endl;
     WANDiscoverable::setActivity(false);    
-    COUT(2) << "disconnecting done" << endl;
+    orxout(internal_info, context::network) << "disconnecting done" << endl;
 
     LANDiscoverable::setActivity(false);
@@ -158,8 +158,8 @@
     chat->setPeerID(NETWORK_PEER_ID_BROADCAST);
     chat->send( static_cast<Host*>(this) );
-//         COUT(3) << "could not send Chat message to client ID: " << temp->getID() << std::endl;
+//         orxout(internal_warning, context::network) << "could not send Chat message to client ID: " << temp->getID() << endl;
 //       temp = temp->next();
 //     }
-//    COUT(1) << "Player " << playerID << ": " << message << std::endl;
+//    orxout(message) << "Player " << playerID << ": " << message << endl;
     return true;
   }
@@ -246,5 +246,5 @@
   {
 //     for( ClientInformation* temp=ClientInformation::getBegin(); temp!=0; temp=temp->next() )
-//       COUT(0) << "Round trip time to client with ID: " << temp->getID() << " is " << temp->getRTT() << " ms" << endl;
+//       orxout(message) << "Round trip time to client with ID: " << temp->getID() << " is " << temp->getRTT() << " ms" << endl;
   }
 
@@ -268,11 +268,11 @@
       return;
     GamestateManager::update();
-//     COUT(5) << "Server: one gamestate update complete, goig to sendGameState" << std::endl;
-    //std::cout << "updated gamestate, sending it" << std::endl;
+//     orxout(verbose_more, context::network) << "Server: one gamestate update complete, goig to sendGameState" << endl;
+    //orxout(verbose_more, context::network) << "updated gamestate, sending it" << endl;
     //if(clients->getGamestateID()!=GAMESTATEID_INITIAL)
     sendGameStates();
     sendObjectDeletes();
-//     COUT(5) << "Server: one sendGameState turn complete, repeat in next tick" << std::endl;
-    //std::cout << "sent gamestate" << std::endl;
+//     orxout(verbose_more, context::network) << "Server: one sendGameState turn complete, repeat in next tick" << endl;
+    //orxout(verbose_more, context::network) << "sent gamestate" << endl;
   }
 
@@ -305,9 +305,9 @@
       return true;  //everything ok (no deletes this tick)
     }
-//     COUT(3) << "sending DeleteObjects" << std::endl;
+//     orxout(verbose, context::network) << "sending DeleteObjects" << endl;
 //     while(temp != NULL){
 //       if( !(temp->getSynched()) )
 //       {
-//         COUT(5) << "Server: not sending gamestate" << std::endl;
+//         orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
 //         temp=temp->next();
 //         continue;
@@ -318,5 +318,5 @@
     del->setPeerID(NETWORK_PEER_ID_BROADCAST);
     if ( !del->send( static_cast<Host*>(this) ) )
-      COUT(3) << "Server: could not broadcast deleteObjects packet" << std::endl;
+      orxout(internal_warning, context::network) << "Server: could not broadcast deleteObjects packet" << endl;
 //       temp=temp->next();
       // gs gets automatically deleted by enet callback
@@ -331,9 +331,9 @@
 //     static unsigned int newid=1;
 // 
-//     COUT(2) << "Server: adding client" << std::endl;
+//     orxout(internal_info, context::network) << "Server: adding client" << endl;
 //     ClientInformation *temp = ClientInformation::insertBack(new ClientInformation);
 //     if(!temp)
 //     {
-//       COUT(2) << "Server: could not add client" << std::endl;
+//       orxout(internal_warning, context::network) << "Server: could not add client" << endl;
 //     }
 //     temp->setID(newid);
@@ -347,5 +347,5 @@
 //     ++newid;
 
-    COUT(3) << "Server: added client id: " << peerID << std::endl;
+    orxout(internal_info, context::network) << "Server: added client id: " << peerID << endl;
     createClient(peerID);
 }
@@ -353,5 +353,5 @@
   void Server::removePeer(uint32_t peerID)
   {
-    COUT(4) << "removing client from list" << std::endl;
+    orxout(verbose, context::network) << "removing client from list" << endl;
 //     ClientInformation *client = ClientInformation::findClient(&event->peer->address);
 //     if(!client)
@@ -395,8 +395,8 @@
 //     if(!temp)
 //     {
-//       COUT(2) << "Server. could not create client with id: " << clientID << std::endl;
+//       orxout(internal_error, context::network) << "Server. could not create client with id: " << clientID << endl;
 //       return false;
 //     }
-//     COUT(4) << "Con.Man: creating client id: " << temp->getID() << std::endl;
+//     orxout(verbose, context::network) << "Con.Man: creating client id: " << temp->getID() << endl;
 
     // synchronise class ids
@@ -412,5 +412,5 @@
     GamestateManager::setSynched(clientID);
     
-    COUT(4) << "sending welcome" << std::endl;
+    orxout(verbose, context::network) << "sending welcome" << endl;
     packet::Welcome *w = new packet::Welcome(clientID);
     w->setPeerID(clientID);
@@ -457,8 +457,8 @@
       chat->setPeerID(NETWORK_PEER_ID_BROADCAST);
       chat->send( static_cast<Host*>(this) );
-//         COUT(3) << "could not send Chat message to client ID: " << temp->getID() << std::endl;
+//         orxout(internal_warning, context::network) << "could not send Chat message to client ID: " << temp->getID() << endl;
 //       temp = temp->next();
     }
-//    COUT(1) << "Player " << Host::getPlayerID() << ": " << message << std::endl;
+//    orxout(message) << "Player " << Host::getPlayerID() << ": " << message << endl;
     for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
       it->incomingChat(message, clientID);
@@ -476,5 +476,5 @@
     }
     assert(failures<10);
-    COUT(4) << "syncClassid:\tall synchClassID packets have been sent" << std::endl;
+    orxout(verbose, context::network) << "syncClassid:\tall synchClassID packets have been sent" << endl;
   }
 
Index: code/branches/output/src/libraries/network/ServerConnection.cc
===================================================================
--- code/branches/output/src/libraries/network/ServerConnection.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/ServerConnection.cc	(revision 8807)
@@ -61,5 +61,5 @@
   {
     if (enet_address_set_host (this->bindAddress_, bindAddress.c_str()) < 0)
-        COUT(1) << "Error: Could not resolve \"" << bindAddress << "\"." << std::endl;
+        orxout(internal_error, context::network) << "Could not resolve \"" << bindAddress << "\"." << endl;
   }
 
@@ -75,5 +75,5 @@
     if ( this->host_ == NULL )
     {
-        COUT(1) << "ServerConnection: host_ == NULL" << std::endl;
+        orxout(internal_error, context::network) << "ServerConnection: host_ == NULL" << endl;
         return false;
     }
@@ -83,9 +83,9 @@
     assert( this->host_->socket4 != ENET_SOCKET_NULL || this->host_->socket6 != ENET_SOCKET_NULL );
     if (this->host_->socket4 == ENET_SOCKET_NULL)
-        COUT(2) << "Warning: IPv4 Socket failed." << std::endl;
+        orxout(internal_warning, context::network) << "IPv4 Socket failed." << endl;
     else if (this->host_->socket6 == ENET_SOCKET_NULL)
-        COUT(2) << "Warning: IPv6 Socket failed." << std::endl;
+        orxout(internal_warning, context::network) << "IPv6 Socket failed." << endl;
     else
-        COUT(3) << "Info: Using IPv4 and IPv6 Sockets." << std::endl;
+        orxout(internal_info, context::network) << "Using IPv4 and IPv6 Sockets." << endl;
     
     // start communication thread
@@ -114,5 +114,5 @@
 //       ClientInformation *temp = ClientInformation::findClient(clientID);
 //       if(!temp){
-//         COUT(3) << "C.Man: addPacket findClient failed" << std::endl;
+//         orxout(internal_warning, context::network) << "C.Man: addPacket findClient failed" << endl;
 //       }
       Connection::addPacket(packet, clientID, channelID);
Index: code/branches/output/src/libraries/network/TrafficControl.cc
===================================================================
--- code/branches/output/src/libraries/network/TrafficControl.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/TrafficControl.cc	(revision 8807)
@@ -287,7 +287,7 @@
   {
     std::list<obj>::iterator it;
-    COUT(0) << "=========== Objectlist ===========" << endl;
+    orxout(debug_output, context::network) << "=========== Objectlist ===========" << endl;
     for( it=list.begin(); it!=list.end(); it++)
-      COUT(0) << "ObjectID: " << it->objID << " creatorID: " << it->objCreatorID << " Priority: " << clientListPerm_[clientID][it->objID].objValuePerm + clientListPerm_[clientID][it->objID].objValueSched << " size: " << it->objSize << endl;
+      orxout(debug_output, context::network) << "ObjectID: " << it->objID << " creatorID: " << it->objCreatorID << " Priority: " << clientListPerm_[clientID][it->objID].objValuePerm + clientListPerm_[clientID][it->objID].objValueSched << " size: " << it->objSize << endl;
   }
 
Index: code/branches/output/src/libraries/network/WANDiscoverable.cc
===================================================================
--- code/branches/output/src/libraries/network/WANDiscoverable.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/WANDiscoverable.cc	(revision 8807)
@@ -44,5 +44,5 @@
   {
     /* debugging output */
-    COUT(4) << "Creating WANDiscoverable.\n";
+    orxout(verbose, context::master_server) << "Creating WANDiscoverable." << endl;
   
     /* register object in orxonox */
@@ -91,5 +91,5 @@
     if( msc.initialize() )
     {
-      COUT(2) << "Error: could not initialize master server communications!\n";
+      orxout(internal_error, context::master_server) << "Could not initialize master server communications!" << endl;
       return false;
     }
@@ -98,11 +98,11 @@
     if( msc.connect( this->msaddress.c_str(), ORX_MSERVER_PORT ) )
     {
-      COUT(2) << "Error: could not connect to master server at " 
-                 << this->msaddress << std::endl;
+      orxout(internal_error, context::master_server) << "Could not connect to master server at " 
+                 << this->msaddress << endl;
       return false;
     }
                  
     /* debugging output */
-    COUT(4) << "Initialization of WANDiscoverable complete.\n";
+    orxout(verbose, context::master_server) << "Initialization of WANDiscoverable complete." << endl;
     
     
Index: code/branches/output/src/libraries/network/WANDiscovery.cc
===================================================================
--- code/branches/output/src/libraries/network/WANDiscovery.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/WANDiscovery.cc	(revision 8807)
@@ -45,5 +45,5 @@
   {
     /* debugging output */
-    COUT(4) << "Creating WANDiscovery.\n";
+    orxout(verbose, context::master_server) << "Creating WANDiscovery." << endl;
   
     /* register object in orxonox */
@@ -55,13 +55,13 @@
     /* initialize it and see if it worked */
     if( msc.initialize() )
-      COUT(2) << "Error: could not initialize master server communications!\n";
+      orxout(internal_error, context::master_server) << "Could not initialize master server communications!" << endl;
 
     /* connect and see if it worked */
     if( msc.connect( this->msaddress.c_str(), ORX_MSERVER_PORT ) )
-      COUT(2) << "Error: could not connect to master server at " 
-        << this->msaddress << std::endl;
+      orxout(internal_error, context::master_server) << "Could not connect to master server at " 
+        << this->msaddress << endl;
 
     /* debugging output */
-    COUT(4) << "Initialization of WANDiscovery complete.\n";
+    orxout(verbose, context::master_server) << "Initialization of WANDiscovery complete." << endl;
   }
 
@@ -85,5 +85,5 @@
     /* error recognition */
     if( !ev || !ev->packet || !ev->packet->data )
-    { COUT(2) << "Bad arguments received in WANDiscovery's reply handler.\n";
+    { orxout(internal_warning, context::master_server) << "Bad arguments received in WANDiscovery's reply handler." << endl;
       return 0;
     }
Index: code/branches/output/src/libraries/network/packet/Acknowledgement.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/Acknowledgement.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/Acknowledgement.cc	(revision 8807)
@@ -64,5 +64,5 @@
 
 bool Acknowledgement::process(orxonox::Host* host){
-  COUT(5) << "processing ACK with ID: " << getAckID() << endl;
+  orxout(verbose_more, context::packets) << "processing ACK with ID: " << getAckID() << endl;
   bool b = host->ackGamestate(getAckID(), peerID_);
   delete this;
Index: code/branches/output/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/ClassID.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/ClassID.cc	(revision 8807)
@@ -92,5 +92,5 @@
   assert(tempsize==packetSize);
 
-  COUT(5) << "classid packetSize is " << packetSize << endl;
+  orxout(verbose_more, context::packets) << "classid packetSize is " << packetSize << endl;
 
 }
@@ -131,5 +131,5 @@
   Identifier::clearNetworkIDs();
 
-  COUT(4) << "=== processing classids: " << endl;
+  orxout(verbose, context::packets) << "=== processing classids: " << endl;
   std::pair<uint32_t, std::string> tempPair;
   Identifier *id;
@@ -143,7 +143,7 @@
     classname = temp+2*sizeof(uint32_t);
     id=ClassByString( std::string((const char*)classname) );
-    COUT(3) << "processing classid: " << networkID << " name: " << classname << " id: " << id << std::endl;
+    orxout(internal_info, context::packets) << "processing classid: " << networkID << " name: " << classname << " id: " << id << endl;
     if(id==NULL){
-      COUT(0) << "Received a bad classname" << endl;
+      orxout(user_error, context::packets) << "Received a bad classname" << endl;
       abort();
     }
Index: code/branches/output/src/libraries/network/packet/DeleteObjects.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/DeleteObjects.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/DeleteObjects.cc	(revision 8807)
@@ -62,5 +62,5 @@
   if(number==0)
     return false;
-  COUT(4) << "sending DeleteObjects: ";
+  orxout(verbose, context::packets) << "sending DeleteObjects: ";
   unsigned int size = sizeof(Type::Value) + sizeof(uint32_t)*(number+1);
   data_ = new uint8_t[size];
@@ -73,8 +73,8 @@
     unsigned int temp = Synchronisable::popDeletedObject();
     *reinterpret_cast<uint32_t*>(tdata) = temp;
-    COUT(4) << temp << ' ';
+    orxout(verbose, context::packets) << temp << ' ';
     tdata += sizeof(uint32_t);
   }
-  COUT(4) << std::endl;
+  orxout(verbose, context::packets) << endl;
   return true;
 }
@@ -90,5 +90,5 @@
   for(unsigned int i=0; i<*(unsigned int *)(data_+_QUANTITY); i++)
   {
-    COUT(4) << "deleting object with id: " << *(uint32_t*)(data_+_OBJECTIDS+i*sizeof(uint32_t)) << std::endl;
+    orxout(verbose, context::packets) << "deleting object with id: " << *(uint32_t*)(data_+_OBJECTIDS+i*sizeof(uint32_t)) << endl;
     Synchronisable::deleteObject( *(uint32_t*)(data_+_OBJECTIDS+i*sizeof(uint32_t)) );
   }
Index: code/branches/output/src/libraries/network/packet/FunctionIDs.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/FunctionIDs.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/FunctionIDs.cc	(revision 8807)
@@ -88,5 +88,5 @@
   }
 
-  COUT(5) << "FunctionIDs packetSize is " << packetSize << endl;
+  orxout(verbose_more, context::packets) << "FunctionIDs packetSize is " << packetSize << endl;
 
 }
@@ -126,5 +126,5 @@
   unsigned char *functionname;
 
-  COUT(4) << "=== processing functionids: " << endl;
+  orxout(verbose, context::packets) << "=== processing functionids: " << endl;
   std::pair<uint32_t, std::string> tempPair;
   // read the total number of classes
@@ -137,5 +137,5 @@
     stringsize = *(uint32_t*)(temp+sizeof(uint32_t));
     functionname = temp+2*sizeof(uint32_t);
-    COUT(3) << "processing functionid: " << networkID << " name: " << functionname << std::endl;
+    orxout(internal_info, context::packets) << "processing functionid: " << networkID << " name: " << functionname << endl;
     NetworkFunctionBase::setNetworkID((const char*)functionname, networkID);
     temp += 2*sizeof(uint32_t) + stringsize;
Index: code/branches/output/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/Gamestate.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/Gamestate.cc	(revision 8807)
@@ -108,5 +108,5 @@
   uint32_t size = calcGamestateSize(id, mode);
 
-  COUT(5) << "G.ST.Man: producing gamestate with id: " << id << std::endl;
+  orxout(verbose_more, context::packets) << "G.ST.Man: producing gamestate with id: " << id << endl;
   if(size==0)
     return false;
@@ -114,5 +114,5 @@
   if(!data_)
   {
-    COUT(2) << "GameStateManager: could not allocate memory" << std::endl;
+    orxout(internal_warning, context::packets) << "GameStateManager: could not allocate memory" << endl;
     return false;
   }
@@ -139,5 +139,5 @@
       assert(0); // if we don't use multithreading this part shouldn't be neccessary
       // start allocate additional memory
-      COUT(3) << "Gamestate: need additional memory" << std::endl;
+      orxout(internal_info, context::packets) << "Gamestate: need additional memory" << endl;
       ObjectList<Synchronisable>::iterator temp = it;
       uint32_t addsize=tempsize;
@@ -167,6 +167,6 @@
   //stop write gamestate header
 
-  COUT(5) << "Gamestate: Gamestate size: " << currentsize << std::endl;
-  COUT(5) << "Gamestate: 'estimated' (and corrected) Gamestate size: " << size << std::endl;
+  orxout(verbose_more, context::packets) << "Gamestate: Gamestate size: " << currentsize << endl;
+  orxout(verbose_more, context::packets) << "Gamestate: 'estimated' (and corrected) Gamestate size: " << size << endl;
   return true;
 }
@@ -175,5 +175,5 @@
 bool Gamestate::spreadData(uint8_t mode)
 {
-  COUT(5) << "processing gamestate with id " << header_.getID() << endl;
+  orxout(verbose_more, context::packets) << "processing gamestate with id " << header_.getID() << endl;
   assert(data_);
   assert(!header_.isCompressed());
@@ -195,5 +195,5 @@
       else
       {
-//         COUT(4) << "not creating object of classid " << objectheader.getClassID() << endl;
+//         orxout(verbose, context::packets) << "not creating object of classid " << objectheader.getClassID() << endl;
         mem += objectheader.getDataSize() + ( objectheader.isDiffed() ? SynchronisableHeaderLight::getSize() : SynchronisableHeader::getSize() );
       }
@@ -201,5 +201,5 @@
     else
     {
-//       COUT(4) << "updating object of classid " << objectheader.getClassID() << endl;
+//       orxout(verbose, context::packets) << "updating object of classid " << objectheader.getClassID() << endl;
       OrxVerify(s->updateData(mem, mode), "ERROR: could not update Synchronisable with Gamestate data");
     }
@@ -219,7 +219,7 @@
         if (it->objectMode_ != 0x0)
         {
-          COUT(0) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << std::endl;
-          COUT(0) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << std::endl;
-          COUT(0) << "Objects class: " << it->getIdentifier()->getName() << std::endl;
+          orxout(user_error, context::packets) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << endl;
+          orxout(user_error, context::packets) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << endl;
+          orxout(user_error, context::packets) << "Objects class: " << it->getIdentifier()->getName() << endl;
           assert(false);
         }
@@ -232,7 +232,7 @@
           if (it->getObjectID() == *it2)
           {
-            COUT(0) << "Found duplicate objectIDs on the client!" << std::endl
-                    << "Are you sure you don't create a Sychnronisable objcect with 'new' \
-                        that doesn't have objectMode = 0x0?" << std::endl;
+            orxout(user_error, context::packets) << "Found duplicate objectIDs on the client!" << endl
+                                                 << "Are you sure you don't create a Sychnronisable objcect with 'new' \
+                                                     that doesn't have objectMode = 0x0?" << endl;
             assert(false);
           }
@@ -293,8 +293,8 @@
   switch ( retval )
   {
-    case Z_OK: COUT(5) << "G.St.Man: compress: successfully compressed" << std::endl; break;
-    case Z_MEM_ERROR: COUT(1) << "G.St.Man: compress: not enough memory available in gamestate.compress" << std::endl; return false;
-    case Z_BUF_ERROR: COUT(2) << "G.St.Man: compress: not enough memory available in the buffer in gamestate.compress" << std::endl; return false;
-    case Z_DATA_ERROR: COUT(2) << "G.St.Man: compress: data corrupted in gamestate.compress" << std::endl; return false;
+    case Z_OK: orxout(verbose_more, context::packets) << "G.St.Man: compress: successfully compressed" << endl; break;
+    case Z_MEM_ERROR: orxout(internal_error, context::packets) << "G.St.Man: compress: not enough memory available in gamestate.compress" << endl; return false;
+    case Z_BUF_ERROR: orxout(internal_warning, context::packets) << "G.St.Man: compress: not enough memory available in the buffer in gamestate.compress" << endl; return false;
+    case Z_DATA_ERROR: orxout(internal_warning, context::packets) << "G.St.Man: compress: data corrupted in gamestate.compress" << endl; return false;
   }
 
@@ -310,5 +310,5 @@
   header_.setCompSize( buffer );
   header_.setCompressed( true );
-  COUT(4) << "gamestate compress datasize: " << header_.getDataSize() << " compsize: " << header_.getCompSize() << std::endl;
+  orxout(verbose, context::packets) << "gamestate compress datasize: " << header_.getDataSize() << " compsize: " << header_.getCompSize() << endl;
   return true;
 }
@@ -319,5 +319,5 @@
   assert(data_);
   assert(header_.isCompressed());
-  COUT(4) << "GameStateClient: uncompressing gamestate. id: " << header_.getID() << ", baseid: " << header_.getBaseID() << ", datasize: " << header_.getDataSize() << ", compsize: " << header_.getCompSize() << std::endl;
+  orxout(verbose, context::packets) << "GameStateClient: uncompressing gamestate. id: " << header_.getID() << ", baseid: " << header_.getBaseID() << ", datasize: " << header_.getDataSize() << ", compsize: " << header_.getCompSize() << endl;
   uint32_t datasize = header_.getDataSize();
   uint32_t compsize = header_.getCompSize();
@@ -333,8 +333,8 @@
   switch ( retval )
   {
-    case Z_OK: COUT(5) << "successfully decompressed" << std::endl; break;
-    case Z_MEM_ERROR: COUT(1) << "not enough memory available" << std::endl; return false;
-    case Z_BUF_ERROR: COUT(2) << "not enough memory available in the buffer" << std::endl; return false;
-    case Z_DATA_ERROR: COUT(2) << "data corrupted (zlib)" << std::endl; return false;
+    case Z_OK: orxout(verbose_more, context::packets) << "successfully decompressed" << endl; break;
+    case Z_MEM_ERROR: orxout(internal_error, context::packets) << "not enough memory available" << endl; return false;
+    case Z_BUF_ERROR: orxout(internal_warning, context::packets) << "not enough memory available in the buffer" << endl; return false;
+    case Z_DATA_ERROR: orxout(internal_warning, context::packets) << "data corrupted (zlib)" << endl; return false;
   }
 
@@ -375,5 +375,5 @@
   if( memcmp( origDataPtr+objectOffset, baseDataPtr+objectOffset, objectHeader.getDataSize()) == 0 )
   {
-//     COUT(4) << "skip object " << Synchronisable::getSynchronisable(objectHeader.getObjectID())->getIdentifier()->getName() << endl;
+//     orxout(verbose, context::packets) << "skip object " << Synchronisable::getSynchronisable(objectHeader.getObjectID())->getIdentifier()->getName() << endl;
     origDataPtr += objectOffset + objectHeader.getDataSize(); // skip the whole object
     baseDataPtr += objectOffset + objectHeader.getDataSize();
@@ -431,5 +431,5 @@
 inline void /*Gamestate::*/copyObject( uint8_t*& newData, uint8_t*& origData, uint8_t*& baseData, SynchronisableHeader& objectHeader, std::vector<uint32_t>::iterator& sizes )
 {
-  //       COUT(4) << "docopy" << endl;
+  //       orxout(verbose, context::packets) << "docopy" << endl;
   // Just copy over the whole Object
   memcpy( newData, origData, objectHeader.getDataSize()+SynchronisableHeader::getSize() );
@@ -440,13 +440,13 @@
 //   SynchronisableHeader baseHeader( baseData );
 //   baseData += baseHeader.getDataSize()+SynchronisableHeader::getSize();
-  //       COUT(4) << "copy " << h.getObjectID() << endl;
-  //       COUT(4) << "copy " << h.getObjectID() << ":";
+  //       orxout(verbose, context::packets) << "copy " << h.getObjectID() << endl;
+  //       orxout(verbose, context::packets) << "copy " << h.getObjectID() << ":";
   sizes += Synchronisable::getSynchronisable(objectHeader.getObjectID())->getNrOfVariables();
 //   for( unsigned int i = 0; i < Synchronisable::getSynchronisable(objectHeader.getObjectID())->getNrOfVariables(); ++i )
 //   {
-//     //         COUT(4) << " " << *sizes;
+//     //         orxout(verbose, context::packets) << " " << *sizes;
 //     ++sizes;
 //   }
-    //       COUT(4) << endl;
+    //       orxout(verbose, context::packets) << endl;
 }
 
@@ -541,5 +541,5 @@
       if( SynchronisableHeader(baseDataPtr).getDataSize()==origHeader.getDataSize() )
       {
-//         COUT(4) << "diffing object in order: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
+//         orxout(verbose, context::packets) << "diffing object in order: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
         diffObject(destDataPtr, origDataPtr, baseDataPtr, origHeader, sizesIt);
         diffedObject = true;
@@ -547,5 +547,5 @@
       else
       {
-//         COUT(4) << "copy object because of different data sizes (1): " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
+//         orxout(verbose, context::packets) << "copy object because of different data sizes (1): " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
         copyObject(destDataPtr, origDataPtr, baseDataPtr, origHeader, sizesIt);
         assert(sizesIt != this->sizes_.end() || origDataPtr==origDataEnd);
@@ -565,5 +565,5 @@
         if( SynchronisableHeader(baseDataPtr).getDataSize()==origHeader.getDataSize() )
         {
-//           COUT(4) << "diffing object out of order: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
+//           orxout(verbose, context::packets) << "diffing object out of order: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
           diffObject(destDataPtr, origDataPtr, baseDataPtr, origHeader, sizesIt);
           diffedObject = true;
@@ -571,5 +571,5 @@
         else
         {
-//           COUT(4) << "copy object because of different data sizes (2): " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
+//           orxout(verbose, context::packets) << "copy object because of different data sizes (2): " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
           copyObject(destDataPtr, origDataPtr, baseDataPtr, origHeader, sizesIt);
           assert(sizesIt != this->sizes_.end() || origDataPtr==origDataEnd);
@@ -578,5 +578,5 @@
       else
       {
-//         COUT(4) << "copy object: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
+//         orxout(verbose, context::packets) << "copy object: " << Synchronisable::getSynchronisable(origHeader.getObjectID())->getIdentifier()->getName() << endl;
         assert(baseDataPtr == oldBaseDataPtr);
         copyObject(destDataPtr, origDataPtr, baseDataPtr, origHeader, sizesIt);
@@ -718,8 +718,8 @@
   //copy in the zeros
 //   std::list<obj>::iterator itt;
-//   COUT(0) << "myvector contains:";
+//   orxout() << "myvector contains:";
 //   for ( itt=dataVector_.begin() ; itt!=dataVector_.end(); itt++ )
-//     COUT(0) << " " << (*itt).objID;
-//   COUT(0) << endl;
+//     orxout() << " " << (*itt).objID;
+//   orxout() << endl;
   for(it=dataVector_.begin(); it!=dataVector_.end();){
     SynchronisableHeader oldobjectheader(origdata);
@@ -771,5 +771,5 @@
     nrOfVariables += it->getNrOfVariables();
   }
-//   COUT(0) << "allocating " << nrOfVariables << " ints" << endl;
+//   orxout() << "allocating " << nrOfVariables << " ints" << endl;
   this->sizes_.reserve(nrOfVariables);
   return size;
Index: code/branches/output/src/libraries/network/packet/Packet.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/Packet.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/Packet.cc	(revision 8807)
@@ -192,37 +192,37 @@
 //     peerID = NETWORK_PEER_ID_SERVER;
   Packet *p = 0;
-//   COUT(6) << "packet type: " << *(Type::Value *)&data[_PACKETID] << std::endl;
+//   orxout(verbose_ultra, context::packets) << "packet type: " << *(Type::Value *)&data[_PACKETID] << endl;
   switch( *(Type::Value *)(data + _PACKETID) )
   {
     case Type::Acknowledgement:
-//       COUT(5) << "ack" << std::endl;
+//       orxout(verbose_more, context::packets) << "ack" << endl;
     p = new Acknowledgement( data, peerID );
       break;
     case Type::Chat:
-//       COUT(5) << "chat" << std::endl;
+//       orxout(verbose_more, context::packets) << "chat" << endl;
       p = new Chat( data, peerID );
       break;
     case Type::ClassID:
-//       COUT(5) << "classid" << std::endl;
+//       orxout(verbose_more, context::packets) << "classid" << endl;
       p = new ClassID( data, peerID );
       break;
     case Type::Gamestate:
-//       COUT(5) << "gamestate" << std::endl;
+//       orxout(verbose_more, context::packets) << "gamestate" << endl;
       p = new Gamestate( data, peerID );
       break;
     case Type::Welcome:
-//       COUT(5) << "welcome" << std::endl;
+//       orxout(verbose_more, context::packets) << "welcome" << endl;
       p = new Welcome( data, peerID );
       break;
     case Type::DeleteObjects:
-//       COUT(5) << "deleteobjects" << std::endl;
+//       orxout(verbose_more, context::packets) << "deleteobjects" << endl;
       p = new DeleteObjects( data, peerID );
       break;
     case Type::FunctionCalls:
-//       COUT(5) << "functionCalls" << std::endl;
+//       orxout(verbose_more, context::packets) << "functionCalls" << endl;
       p = new FunctionCalls( data, peerID );
       break;
     case Type::FunctionIDs:
-//       COUT(5) << "functionIDs" << std::endl;
+//       orxout(verbose_more, context::packets) << "functionIDs" << endl;
       p = new FunctionIDs( data, peerID );
       break;
@@ -255,5 +255,5 @@
   packetMap_.erase(it);
   Packet::packetMapMutex_.unlock();
-//   COUT(6) << "PacketMap size: " << packetMap_.size() << std::endl;
+//   orxout(verbose_ultra, context::packets) << "PacketMap size: " << packetMap_.size() << endl;
 }
 
Index: code/branches/output/src/libraries/network/packet/Welcome.cc
===================================================================
--- code/branches/output/src/libraries/network/packet/Welcome.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/packet/Welcome.cc	(revision 8807)
@@ -78,5 +78,5 @@
   assert(*(uint32_t *)(data_ + _ENDIANTEST ) == 0xFEDC4321);
   host->setClientID(clientID);
-  COUT(3) << "Welcome set clientId: " << clientID << endl;
+  orxout(internal_info, context::packets) << "Welcome set clientId: " << clientID << endl;
   Synchronisable::setClient(true);
   delete this;
Index: code/branches/output/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/output/src/libraries/network/synchronisable/Synchronisable.cc	(revision 8788)
+++ code/branches/output/src/libraries/network/synchronisable/Synchronisable.cc	(revision 8807)
@@ -130,5 +130,5 @@
 //     assert( !header.isDiffed() );
 
-    COUT(4) << "fabricating object with id: " << header.getObjectID() << std::endl;
+    orxout(verbose, context::network) << "fabricating object with id: " << header.getObjectID() << endl;
 
     Identifier* id = ClassByID(header.getClassID());
@@ -136,7 +136,7 @@
     {
         for(int i = 0; i<160; i++)
-            COUT(0) << "classid: " << i << " identifier: " << ClassByID(i) << endl;
-        COUT(0) << "Assertion failed: id" << std::endl;
-        COUT(0) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << std::endl;
+            orxout(user_error, context::network) << "classid: " << i << " identifier: " << ClassByID(i) << endl;
+        orxout(user_error, context::network) << "Assertion failed: id" << endl;
+        orxout(user_error, context::network) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << endl;
         abort();
     }
@@ -168,5 +168,5 @@
       bo->setLevel(creator->getLevel());          // Note: this ensures that the level is known on the client for child objects of the scene (and the scene itself)
     //assert(no->classID_ == header.getClassID());
-    COUT(4) << "fabricate objectID_: " << no->objectID_ << " classID_: " << no->classID_ << std::endl;
+    orxout(verbose, context::network) << "fabricate objectID_: " << no->objectID_ << " classID_: " << no->classID_ << endl;
           // update data and create object/entity...
     bool b = no->updateData(mem, mode, true);
@@ -242,5 +242,5 @@
     uint8_t* oldmem = mem;
     if (this->classID_==0)
-      COUT(3) << "classid 0 " << this->getIdentifier()->getName() << std::endl;
+      orxout(internal_info, context::network) << "classid 0 " << this->getIdentifier()->getName() << endl;
 #endif
 
@@ -258,11 +258,11 @@
     // end copy header
 
-    CCOUT(5) << "getting data from objectID_: " << objectID_ << ", classID_: " << classID_ << std::endl;
-//     COUT(4) << "objectid: " << this->objectID_ << ":";
+    orxout(verbose_more, context::network) << "getting data from objectID_: " << objectID_ << ", classID_: " << classID_ << endl;
+//     orxout(verbose, context::network) << "objectid: " << this->objectID_ << ":";
     // copy to location
     for(i=syncList_.begin(); i!=syncList_.end(); ++i)
     {
       uint32_t varsize = (*i)->getData( mem, mode );
-//       COUT(4) << " " << varsize;
+//       orxout(verbose, context::network) << " " << varsize;
       tempsize += varsize;
       sizes.push_back(varsize);
@@ -271,5 +271,5 @@
     }
     assert(tempsize!=0);  // if this happens an empty object (with no variables) would be transmitted
-//     COUT(4) << endl;
+//     orxout(verbose, context::network) << endl;
 
     header.setObjectID( this->objectID_ );
@@ -305,6 +305,6 @@
     if(syncList_.empty())
     {
+      orxout(internal_warning, context::network) << "Synchronisable::updateData syncList_ is empty" << endl;
       assert(0);
-      COUT(2) << "Synchronisable::updateData syncList_ is empty" << std::endl;
       return false;
     }
@@ -326,5 +326,5 @@
     }
 
-    //COUT(5) << "Synchronisable: objectID_ " << syncHeader.getObjectID() << ", classID_ " << syncHeader.getClassID() << " size: " << syncHeader.getDataSize() << " synchronising data" << std::endl;
+    //orxout(verbose_more, context::network) << "Synchronisable: objectID_ " << syncHeader.getObjectID() << ", classID_ " << syncHeader.getClassID() << " size: " << syncHeader.getDataSize() << " synchronising data" << endl;
     if( !syncHeaderLight.isDiffed() )
     {
@@ -344,9 +344,9 @@
     {
       mem += SynchronisableHeaderLight::getSize();
-//       COUT(0) << "objectID: " << this->objectID_ << endl;
+//       orxout(debug_output, context::network) << "objectID: " << this->objectID_ << endl;
       while( mem < data+syncHeaderLight.getDataSize()+SynchronisableHeaderLight::getSize() )
       {
         VariableID varID = *(VariableID*)mem;
-//         COUT(0) << "varID: " << varID << endl;
+//         orxout(debug_output, context::network) << "varID: " << varID << endl;
         assert( varID < syncList_.size() );
         mem += sizeof(VariableID);
Index: code/branches/output/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- code/branches/output/src/libraries/network/synchronisable/Synchronisable.h	(revision 8788)
+++ code/branches/output/src/libraries/network/synchronisable/Synchronisable.h	(revision 8807)
@@ -232,5 +232,5 @@
         it++;
     }
-    COUT(1) << "Tried to unregister not registered variable" << endl;
+    orxout(internal_error, context::network) << "Tried to unregister not registered variable" << endl;
     assert(false); //if we reach this point something went wrong:
     // the variable has not been registered before
Index: code/branches/output/src/libraries/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/branches/output/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 8788)
+++ code/branches/output/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 8807)
@@ -202,5 +202,5 @@
         if ( *static_cast<uint8_t*>(mem) != this->varReference_ )
         { // wrong reference number, so discard the data
-//           COUT(0) << "discharding data" << endl;
+//           orxout(debug_output, context::network) << "discharding data" << endl;
           mem += getSize( mode ); // SynchronisableVariableBidirectional::getSize returns size of variable + reference
           return;
