From: Ben <lgp...@16...> - 2008-04-12 22:28:01
|
Hi Hedayat: It's great! Why not come into my head? :) Best wishes! Ben 在2008-04-13,"Hedayat Vatankhah" <hed...@ai...> 写道: Hi All, Markus Rollmann <rol...@un...> wrote on 04/12/2008 03:45:22 PM: Hi Ben, Ben wrote: 1. >The most simple solution would be a single logchannel for all integrated >agents. A more elaborate solution would provide a channel for each >agent. Opinions? A channel with different kinds of streams for each agent is perfect. Then an agent can log itself powerfully just like the server. The question is how to extend the logserver to support that. Some issues are: Currently the Logserver supports different priority levels, i.e. normal, debug, warning, error. If we extend the logserver to provide additional channels we could add the agent channels as new priority levels (see zeitgeist/logserver/logserver.h the EPriorityLevel enum). In this case using a single new constant like 'eAgent' and offset that with the uniqe agent id would provide a channel id for each agent (i.e. eAgent + 1, eAgent + 2 ...) The downside is we cannot provide different loglevels (i.e. debug, normal etc. for one agent channel). One possibility would be to provide multiple bases like eAgentNormal, eAgentDebug etc. and offset them. This could be hidden behind a nice interface like "GetLog()->AgentDebug(agentId)" Or maybe each agent should have it's own LogServer instance?! Also notice that priority levels should be powers of 2. So, (at least currently) we can have at most 32 priority levels. Cheers, Hedayat |