Index: code/branches/output/data/gui/scripts/GameplayMenu.lua
===================================================================
--- code/branches/output/data/gui/scripts/GameplayMenu.lua	(revision 8837)
+++ code/branches/output/data/gui/scripts/GameplayMenu.lua	(revision 8840)
@@ -18,20 +18,20 @@
 function P.GameplayThemeCombobox_changed(e)
     -- theme
-    logMessage(0, "event: theme")
+    orxout("event: theme")
 end
 
 function P.GameplayDifficultyEasyButton_clicked(e)
     -- difficulty easy
-    logMessage(0, "event: easy")
+    orxout("event: easy")
 end
 
 function P.GameplayDifficultyNormalButton_clicked(e)
     -- difficulty normal
-    logMessage(0, "event: normal")
+    orxout("event: normal")
 end
 
 function P.GameplayDifficultyHardButton_clicked(e)
     -- difficulty hard
-    logMessage(0, "event: hard")
+    orxout("event: hard")
 end
 
Index: code/branches/output/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/output/data/gui/scripts/MultiplayerMenu.lua	(revision 8837)
+++ code/branches/output/data/gui/scripts/MultiplayerMenu.lua	(revision 8840)
@@ -118,7 +118,7 @@
         CEGUI.toListbox(listbox):resetList()
         local discovery = orxonox.WANDiscovery()
-        cout(0, "discovering.\n" )
+        orxout("discovering." )
         discovery:discover()
-        cout(0, "discovered.\n" )
+        orxout("discovered." )
         P.serverList = {}
         local index = 0
Index: code/branches/output/data/gui/scripts/NotificationLayer.lua
===================================================================
--- code/branches/output/data/gui/scripts/NotificationLayer.lua	(revision 8837)
+++ code/branches/output/data/gui/scripts/NotificationLayer.lua	(revision 8840)
@@ -136,5 +136,5 @@
     if index > queue.first then -- Move all older notifications up in the list.
         for i=index-1,-1,queue.first do
-            cout(0, i)
+            orxout(i)
             item = queue.items[i]
             item:setYposition(CEGUI.UDim(0, itemHeight*(queue.last-i-1)))
Index: code/branches/output/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/branches/output/data/gui/scripts/QuestGUI.lua	(revision 8837)
+++ code/branches/output/data/gui/scripts/QuestGUI.lua	(revision 8840)
@@ -220,5 +220,5 @@
 function P.selectQuest(list, quest)
     if quest == nil then -- If the input quest is nil, there is nothing to be selected, an error is output and the first quest is selected instead.
-        cout(1, "Error in QuestGUI: selectQuest(), input quest is nil. Selecting first.")
+        orxout(orxonox.level.internal_error, "Error in QuestGUI: selectQuest(), input quest is nil. Selecting first.")
         list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first
         return
@@ -240,5 +240,5 @@
         list:setItemSelectState(list:getListboxItemFromIndex(index), true)
     else -- If the quest isn't found an error is output and the first quest is selected instead.
-        cout(1, "Error in QuestGUI: selectQuest(), input quest is not in list. Selecting first.")
+        orxout(orxonox.level.internal_error, "Error in QuestGUI: selectQuest(), input quest is not in list. Selecting first.")
         list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first
     end
@@ -313,5 +313,5 @@
             end
         else
-            cout(1, "Error in QuestGUI: changeToSubquest(), quest was nil. Ignoring...")
+            orxout(orxonox.level.internal_error, "Error in QuestGUI: changeToSubquest(), quest was nil. Ignoring...")
         end
     end
Index: code/branches/output/data/lua/LuaStateInit.lua
===================================================================
--- code/branches/output/data/lua/LuaStateInit.lua	(revision 8837)
+++ code/branches/output/data/lua/LuaStateInit.lua	(revision 8840)
@@ -7,9 +7,19 @@
 end
 
--- Create function to log text like COUT, but always prints a line!
-logMessage = function(level, message)
-  luaState:luaLog(level, message)
+-- Prints output to the console and the logfile
+--
+-- Accepts the following arguments:
+--   orxout("message")
+--   orxout(orxonox.level.levelname, "message")
+--   orxout(orxonox.level.levelname, "context", "message)
+orxout = function(arg1, arg2, arg3)
+  if arg1 and arg2 and arg3 then
+    luaState:luaOutput(arg1, arg2, arg3)
+  elseif arg1 and arg2 then
+    luaState:luaOutput(arg1, arg2)
+  else
+    luaState:luaOutput(arg1)
+  end
 end
-cout = logMessage
 
 -- Redirect dofile in order to load with the resource manager
@@ -42,5 +52,5 @@
 require = function(moduleName)
   if not luaState:fileExists(moduleName .. ".lua") then
-    logMessage(2, "Warning: Lua function require() could not find file '" .. moduleName .. ".lua' ")
+    orxout(orxonox.level.internal_warning, "Warning: Lua function require() could not find file '" .. moduleName .. ".lua' ")
     return nil
   end
@@ -85,5 +95,5 @@
   -- Fallback pause function
   pause = function()
-    logMessage(2, [["Warning: debug() called in Lua, but Debugger is not active.
+    orxout(orxonox.level.internal_warning, [["Warning: debug() called in Lua, but Debugger is not active.
 Do you have the IOConsole disabled and are you using Lua version 5.1?"]])
   end
@@ -98,5 +108,5 @@
     end
     -- Display the error message
-    logMessage(1, "Lua runtime error: "..err)
+    orxout(orxonox.level.internal_error, "Lua runtime error: "..err)
   end
 
@@ -106,5 +116,5 @@
   else
     -- Fallback: print stack trace
-    logMessage(3, debug.traceback(""))
+    orxout(orxonox.level.internal_error, debug.traceback(""))
   end
   return err -- Hello Lua debugger user! Please type 'set 2' to get to the
