Hi guys,
First let me thank you all for all the help I have received from these forums. I couldn't of got this working w/out them. I'm on my final stretch I got everything working and had one last question.
I currently have my ejabberd on two nodes which are clustered. They are setup to replicate most tables because I want one to be able to be the fail-safe if the other goes down. This is working great the problem is i have the log_level set to 4 and its printing a message to the log every few seconds to indicate that it is communicating w/ the other node. This message is indicated w/ an I in front of it which I'm assuming is for Information. The problem is the level for showing when a user has logged into the server is the same (level 4 - I). Is there a way to filter out the messages so I only get the messages indicating wither a person logged in and not the communication chatter between the two nodes? The only reason i ask is because im getting approximately 2500 lines of text an hour being logged to the file.
Thanks Guys
Andy
Only modifying source code
Is there a way to filter out the messages so I only get the messages indicating wither a person logged in and not the communication chatter between the two nodes?
In ejabberd 2.0.x the loglevel is set globally for all the node, and there's no way to set different loglevesl for different modules, or filter the messages.
But if you can recompile ejabberd, it is easy to remove the lines in source code that annoy you.
If you show here examples of the messages you don't want to be shown in loglevel-4, I can search the code that generates them and move to loglevel-5, and paste a patch so you can apply and recompile.
Thanks Badlop The following
Thanks Badlop
The following is some sample output:
=INFO REPORT==== 2008-06-05 16:06:24 ===
I(<0.272.0>:ejabberd_listener:112) : (#Port<0.400>) Accepted connection {{XXX,XXX,XXX,216},54354} -> {{XXX,XXX,XXX,194},5222}
=INFO REPORT==== 2008-06-05 16:06:29 ===
I(<0.272.0>:ejabberd_listener:112) : (#Port<0.404>) Accepted connection {{XXX,XXX,XXX,206},55265} -> {{XXX,XXX,XXX,194},5222}
Found
Found it:
ejabberd_listener.erl -- Commented out these lines:
% case {inet:sockname(Socket), inet:peername(Socket)} of
% {{ok, Addr}, {ok, PAddr}} ->
% ?INFO_MSG("(~w) Accepted connection ~w -> ~w",
% [Socket, PAddr, Addr]);
% _ ->
% ok
% end,
If I could make a suggestion I would say have this print only in debug mode by default instead of Information level.
Thanks
Andy