aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2008-01-16 10:08:17 +0000
committerBadlop <badlop@process-one.net>2008-01-16 10:08:17 +0000
commitf361633f36b82509df27c1f23105e9f9896c1e54 (patch)
tree157bbf6eaec9c9deb6d451016f7b8bfec23d67fb
parent* doc/guide.tex: Improved the documentation of Binary (diff)
* 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 SVN Revision: 1155
-rw-r--r--ChangeLog10
-rw-r--r--doc/guide.html10
-rw-r--r--doc/guide.tex18
-rw-r--r--src/mod_caps.erl4
-rw-r--r--src/mod_muc/mod_muc_room.erl8
5 files changed, 33 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 485d85149..3ae80e68a 100644
--- 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
diff --git a/doc/guide.html b/doc/guide.html
index bce41c1d9..d2fa642bd 100644
--- a/doc/guide.html
+++ b/doc/guide.html
@@ -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">
diff --git a/doc/guide.tex b/doc/guide.tex
index 9f69e6d2f..02aa1455c 100644
--- a/doc/guide.tex
+++ b/doc/guide.tex
@@ -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
diff --git a/src/mod_caps.erl b/src/mod_caps.erl
index 8d74dfe2b..3734982eb 100644
--- a/src/mod_caps.erl
+++ b/src/mod_caps.erl
@@ -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
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl
index 75aec088f..b7ced034f 100644
--- a/src/mod_muc/mod_muc_room.erl
+++ b/src/mod_muc/mod_muc_room.erl
@@ -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 ->