diff --git a/ChangeLog b/ChangeLog index 485d85149..3ae80e68a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-01-16 Badlop + + * 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 * 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:
/var/lib/ejabberd/
.erlang.cookie
Erlang cookie file -
db
Database spool files +
db
Mnesia database spool files
ebin
Binary Erlang files (*.beam)
priv
@@ -393,8 +393,8 @@ To get the full list run the command:
/var/log/ejabberd/
Log files (see section 7.2):
- ejabberd.log
Messages reported by ejabberd code -
sasl.log
Messages reported by Erlang/OTP + ejabberd.log
ejabberd service log +
sasl.log
Erlang/OTP system log

2.4.5  Start

@@ -2706,7 +2706,7 @@ all the environment variables and command line parameters.

The environment

EJABBERD_MSGS_PATH
Path to the directory with translated strings.
EJABBERD_LOG_PATH
- Path to the ejabberd log file. + Path to the ejabberd service log file.
EJABBERD_SO_PATH
Path to the directory with binary system libraries.
HOME
@@ -2744,7 +2744,7 @@ Starts the Erlang system detached from the system console.
-mnesia dir "/var/lib/ejabberd/db/nodename"
Specify the Mnesia database directory.
-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.
+K [true|false]
Kernel polling.
-smp [auto|enable|disable]
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 ->