+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
</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">
</DD></DL>
</DD><DT CLASS="dt-description"><B><TT>/var/log/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Log files (see section <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>  Start</H3><!--SEC END --><P>
</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">
</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">
\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}
\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}
\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}
\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]}
\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
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
[{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) ->
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}
{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 ->