-------------------------------------------------------------------------
-- $Author$
-- $Revision$  - $Date$
-------------------------------------------------------------------------

require"scheduler"
require"oil"
local verbose = require "loop.debug.verbose"

sga = sga or {}
sga.verbose = verbose
package.loaded["sga.verbose"] = verbose

-- verbose.Timed = "%d/%m %H:%M:%S"
verbose.Timed = "%d/%m/%y %H:%M:%S"
--verbose.Timed = true
--verbose.Timed.services = true
--verbose.Timed = {service = true}
--
-- aspect selections
--
verbose.addgroup("services", "kill", "top")
verbose.addgroup("basic", "init", "error")
verbose.addgroup("commands", "cmdcomp", "cmdretr", "cmdexec", "cmdinfo", "cmdkill")
verbose.addgroup("platform", "platerror", "platmsg")

--              
-- architectural levels 
--          
verbose.insertlevel(1, "basic", "services", "commands","platcmd","platerror")
--verbose.insertlevel(2, "csfs", "platform")
verbose.insertlevel(2, "platform")

if servermanager then
  servermanager.writeError = function(...)
    verbose.platerror(arg)
  end
  servermanager.writeMsg = function(...)
    verbose.platmsg(arg)
  end
  servermanager.writeCmd = function(...)
    verbose.platcmd(arg)
  end
end

verbose.level(2)
