]> granicus.if.org Git - ejabberd/commitdiff
* doc/guide.tex: Updated the names of log files.
authorBadlop <badlop@process-one.net>
Wed, 16 Jan 2008 10:08:17 +0000 (10:08 +0000)
committerBadlop <badlop@process-one.net>
Wed, 16 Jan 2008 10:08:17 +0000 (10:08 +0000)
* doc/guide.html: Likewise

* src/mod_muc/mod_muc_room.erl: Added log messages for room
destroy

* src/mod_caps.erl: Small beautify of log error messages

SVN Revision: 1155

ChangeLog
doc/guide.html
doc/guide.tex
src/mod_caps.erl
src/mod_muc/mod_muc_room.erl

index 485d851495c7cee65334ba35e4da89970d4f9f50..3ae80e68a380c663a3e0420bc257ec53731809c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-16  Badlop  <badlop@process-one.net>
+
+       * doc/guide.tex: Updated the names of log files.
+       * doc/guide.html: Likewise
+
+       * src/mod_muc/mod_muc_room.erl: Added log messages for room
+       destroy
+
+       * src/mod_caps.erl: Small beautify of log error messages
+
 2008-01-15  Badlop  <badlop@process-one.net>
 
        * doc/guide.tex: Improved the documentation of Binary
index bce41c1d9d190b26d78a5e1de3532a6dfba61fb8..d2fa642bdcf2f146da5adfae62ddefceae46b19b 100644 (file)
@@ -383,7 +383,7 @@ To get the full list run the command:
        </DD><DT CLASS="dt-description"><B><TT>/var/lib/ejabberd/</TT></B></DT><DD CLASS="dd-description">
                <DL CLASS="description"><DT CLASS="dt-description">
                        <B><TT>.erlang.cookie</TT></B></DT><DD CLASS="dd-description"> Erlang cookie file
-                       </DD><DT CLASS="dt-description"><B><TT>db</TT></B></DT><DD CLASS="dd-description"> Database spool files
+                       </DD><DT CLASS="dt-description"><B><TT>db</TT></B></DT><DD CLASS="dd-description"> Mnesia database spool files
                        </DD><DT CLASS="dt-description"><B><TT>ebin</TT></B></DT><DD CLASS="dd-description"> Binary Erlang files (*.beam)
                        </DD><DT CLASS="dt-description"><B><TT>priv</TT></B></DT><DD CLASS="dd-description">
                                <DL CLASS="description"><DT CLASS="dt-description">
@@ -393,8 +393,8 @@ To get the full list run the command:
                </DD></DL>
        </DD><DT CLASS="dt-description"><B><TT>/var/log/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Log files (see section&#XA0;<A HREF="#logfiles">7.2</A>):
                <DL CLASS="description"><DT CLASS="dt-description">
-                       <B><TT>ejabberd.log</TT></B></DT><DD CLASS="dd-description"> Messages reported by ejabberd code
-                       </DD><DT CLASS="dt-description"><B><TT>sasl.log</TT></B></DT><DD CLASS="dd-description"> Messages reported by Erlang/OTP
+                       <B><TT>ejabberd.log</TT></B></DT><DD CLASS="dd-description"> ejabberd service log
+                       </DD><DT CLASS="dt-description"><B><TT>sasl.log</TT></B></DT><DD CLASS="dd-description"> Erlang/OTP system log
                </DD></DL>
 </DD></DL><!--TOC subsection Start-->
 <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc13">2.4.5</A>&#XA0;&#XA0;Start</H3><!--SEC END --><P>
@@ -2706,7 +2706,7 @@ all the environment variables and command line parameters.</P><P>The environment
 </DD><DT CLASS="dt-description"><B><TT>EJABBERD_MSGS_PATH</TT></B></DT><DD CLASS="dd-description"> 
        Path to the directory with translated strings.
 </DD><DT CLASS="dt-description"><B><TT>EJABBERD_LOG_PATH</TT></B></DT><DD CLASS="dd-description"> 
-       Path to the ejabberd log file.
+       Path to the ejabberd service log file.
 </DD><DT CLASS="dt-description"><B><TT>EJABBERD_SO_PATH</TT></B></DT><DD CLASS="dd-description"> 
        Path to the directory with binary system libraries.
 </DD><DT CLASS="dt-description"><B><TT>HOME</TT></B></DT><DD CLASS="dd-description"> 
@@ -2744,7 +2744,7 @@ Starts the Erlang system detached from the system console.
 </DD><DT CLASS="dt-description"><B><TT>-mnesia dir "/var/lib/ejabberd/db/nodename"</TT></B></DT><DD CLASS="dd-description">
        Specify the Mnesia database directory.
 </DD><DT CLASS="dt-description"><B><TT>-sasl sasl_error_logger {file, "/var/log/ejabberd/sasl.log"}</TT></B></DT><DD CLASS="dd-description">
-       Specify the directory for the sasl.log file.
+       Path to the Erlang/OTP system log file.
 </DD><DT CLASS="dt-description"><B><TT>+K [true|false]</TT></B></DT><DD CLASS="dd-description"> 
        Kernel polling.
 </DD><DT CLASS="dt-description"><B><TT>-smp [auto|enable|disable]</TT></B></DT><DD CLASS="dd-description"> 
index 9f69e6d2ff08903fa9ef71531eed4a48b1503754..02aa1455cdf965de50bb930245f8ee427733e21f 100644 (file)
@@ -337,7 +337,7 @@ The files and directories created are, by default:
        \titem{/var/lib/ejabberd/}
                \begin{description}
                        \titem{.erlang.cookie} Erlang cookie file
-                       \titem{db} Database spool files
+                       \titem{db} Mnesia database spool files
                        \titem{ebin} Binary Erlang files (*.beam)
                        \titem{priv}
                                \begin{description}
@@ -347,8 +347,8 @@ The files and directories created are, by default:
                \end{description}
        \titem{/var/log/ejabberd/} Log files (see section~\ref{logfiles}):
                \begin{description}
-                       \titem{ejabberd.log} Messages reported by ejabberd code
-                       \titem{sasl.log} Messages reported by Erlang/OTP
+                       \titem{ejabberd.log} ejabberd service log
+                       \titem{sasl.log} Erlang/OTP system log
                \end{description}
 \end{description}
 
@@ -3360,7 +3360,7 @@ The environment variables:
   \titem{EJABBERD\_MSGS\_PATH} 
        Path to the directory with translated strings.
   \titem{EJABBERD\_LOG\_PATH} 
-       Path to the ejabberd log file.
+       Path to the ejabberd service log file.
   \titem{EJABBERD\_SO\_PATH} 
        Path to the directory with binary system libraries.
   \titem{HOME} 
@@ -3400,7 +3400,7 @@ The command line parameters:
   \titem{-mnesia dir "/var/lib/ejabberd/db/nodename"}
        Specify the Mnesia database directory.
   \titem{-sasl sasl\_error\_logger \{file, "/var/log/ejabberd/sasl.log"\}}
-       Specify the directory for the sasl.log file.
+       Path to the Erlang/OTP system log file.
   \titem{+K [true|false]} 
        Kernel polling.
   \titem{-smp [auto|enable|disable]} 
@@ -3834,14 +3834,14 @@ Example configuration:
 \section{Log Files}
 \label{logfiles}
 
-\ejabberd{} writes messages in two log files:
+An \ejabberd{} node writes two log files:
 \begin{description}
-       \titem{ejabberd.log} Messages reported by \ejabberd{} code
-       \titem{sasl.log} Messages reported by Erlang/OTP using SASL (System Architecture Support Libraries)
+       \titem{ejabberd.log} is the ejabberd service log, with the messages reported by \ejabberd{} code
+       \titem{sasl.log} is the Erlang/OTP system log, with the messages reported by Erlang/OTP using SASL (System Architecture Support Libraries)
 \end{description}
 
 The option \term{loglevel} modifies the verbosity of the file ejabberd.log.
-There possible levels are:
+The possible levels are:
 \begin{description}
        \titem{0} No ejabberd log at all (not recommended)
        \titem{1} Critical
index 8d74dfe2bb88ed8fd8fc541ff27beeb0a0c6fe17..3734982ebd53eba530a305f6b3bb588a2b1356ef 100644 (file)
@@ -252,9 +252,9 @@ handle_cast({disco_response, From, _To,
            end;
        {error, _} ->
            gen_server:cast(self(), visit_feature_queries),
-           ?ERROR_MSG("Error IQ reponse IQ from ~s: ~p", [jlib:jid_to_string(From), SubEls]);
+           ?ERROR_MSG("Error IQ reponse IQ from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
        {result, _} ->
-           ?ERROR_MSG("Invalid IQ contents from ~s: ~p", [jlib:jid_to_string(From), SubEls]);
+           ?ERROR_MSG("Invalid IQ contents from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
        _ ->
            %% Can't do anything about errors
            ok
index 75aec088f198eefc56026af30dd4aedec758b4b7..b7ced034fb596a990ca60ede112b424abe0f5e38 100644 (file)
@@ -612,8 +612,12 @@ handle_event({destroy, Reason}, _StateName, StateData) ->
                    [{xmlelement, "reason",
                      [], [{xmlcdata, Reason}]}]
            end}, StateData),
+    ?INFO_MSG("Destroyed MUC room ~s with reason: ~p", 
+             [jlib:jid_to_string(StateData#state.jid), Reason]),
     {stop, normal, StateData};
 handle_event(destroy, StateName, StateData) ->
+    ?INFO_MSG("Destroyed MUC room ~s", 
+             [jlib:jid_to_string(StateData#state.jid)]),
     handle_event({destroy, none}, StateName, StateData);
 
 handle_event({set_affiliations, Affiliations}, StateName, StateData) ->
@@ -938,6 +942,8 @@ process_presence(From, Nick, {xmlelement, "presence", Attrs, _Els} = Packet,
     case (not (StateData1#state.config)#config.persistent) andalso
        (?DICT:to_list(StateData1#state.users) == []) of
        true ->
+           ?INFO_MSG("Destroyed MUC room ~s because it's temporary and empty", 
+                     [jlib:jid_to_string(StateData#state.jid)]),
            {stop, normal, StateData1};
        _ ->
            {next_state, normal_state, StateData1}
@@ -2396,7 +2402,7 @@ process_iq_owner(From, set, Lang, SubEl, StateData) ->
                            {error, ?ERR_BAD_REQUEST}
                    end;
                [{xmlelement, "destroy", _Attrs1, _Els1} = SubEl1] ->
-                   ?INFO_MSG("Destroyed MUC room ~s by ~s", 
+                   ?INFO_MSG("Destroyed MUC room ~s by the owner ~s", 
                              [jlib:jid_to_string(StateData#state.jid), jlib:jid_to_string(From)]),
                    destroy_room(SubEl1, StateData);
                Items ->