25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Badlop
91dee14ad6 Fix errors in EDoc comments 2010-10-28 18:23:02 +02:00
Badlop
864b0ec149 Document ejabberd_loglevel using EDoc (EJAB-225) 2010-10-15 13:10:56 +02:00
Badlop
abdbb347eb Rename ejabberd_loglevel:get/0 to get_default, and add a more general get (EJAB-225)
API change: ejabberd_loglevel:get/0 renamed to ejabberd_loglevel:get_default/0
2010-10-15 13:10:53 +02:00
Andreas Köhler
651ee5eb19 Fix unused variable warning in ejabberd_loglevel 2010-10-15 13:10:43 +02:00
Andreas Köhler
e1f5fb798c Add set_custom/2, clear_custom/0 and clear_custom/1 to ejabberd_loglevel 2010-10-15 13:10:42 +02:00
Andreas Köhler
81555d8def Add support for changing the loglevels for given modules (EJAB-225)
ejabberd_loglevel:set/1 now understands more input formats:

set(Param) -> {module, ejabberd_logger}
    Param = Level | {Level, CustomLevels}
    CustomLevels = [CustomLevel]
    CustomLevel = {Module, Level}
    Module = atom()
    Level = integer() | atom()

set(Level) is equivalent to set({Level, []}), so it clears all module
level customizations. log_src/2 adds additional function heads for those
_msg function and module combinations that need non-default behavior,
i.e. add or filter logging.

ejabberd_loglevel:get/0 only returns the default log level. To retrieve
the complete setting use ejabberd_logger:get/0 instead.
2010-10-15 13:10:40 +02:00
Andreas Köhler
cc76869da5 Use warning_msg event type for warning log level. 2010-10-15 13:10:39 +02:00
Andreas Köhler
1cbe821145 Improve ejabberd_logger code generation
Split the monolithic function ejabberd_loglevel:ejabberd_logger_src/1
into separate functions returning deep lists.

log_src/2 now returns the code for any of *_msg/4. Its parameters are
the current loglevel (integer()) and a loglevel specification
(#loglevel{}), with added information in #loglevel:

- function: The api function enabled by this level, may be no_log
- event_type: The type of the event sent to the error_logger
- msg_prefix: One character used in the message (one of "DIWEC")

If the current loglevel is too low for logging, the api function is
optimized at compile time.
2010-10-15 13:10:36 +02:00
Andreas Köhler
61d8bf9440 Use records for encoding static loglevel information. 2010-10-15 13:10:34 +02:00
Badlop
1bcd481fdc Update year of ProcessOne copyright from 2009 to 2010 (EJAB-1159)
SVN Revision: 2892
2010-01-12 16:15:16 +00:00
Jérôme Sautret
0cc9d8f8a0 * src/ejabberd_loglevel.erl: add get/0 API function that returns current log level (EJAB-1004).
SVN Revision: 2426
2009-08-06 10:56:55 +00:00
Badlop
523239d5a7 Don't use lists:keyfind/3 bcause it was introduced only in recent R13A.
SVN Revision: 2341
2009-06-25 18:05:12 +00:00
Badlop
dff6e28b2d * src/ejabberd_loglevel.erl: Use dynamic_compile instead of
ram_file_io_server. Support definition of loglevels with integer
or atom. (thanks to Geoff Cant)(EJAB-919)
* src/dynamic_compile.erl: Added erlang module that converts
string to binary loadable code by Mats Cronqvist, Chris Newcombe,
and Jacob Vorreuter.
* src/ram_file_io_server.erl: Remove file not longer useful.
* src/ejabberd.app: Likewise

SVN Revision: 2054
2009-05-06 14:51:51 +00:00
Badlop
f09509502e * doc/guide.tex: Update copyright date 2008 to 2009 (EJAB-842)
* doc/guide.html: Likewise
* src/*/*.erl: Likewise
* src/*/*.erl: Remove unneeded blankspaces in license text

SVN Revision: 1804
2009-01-12 14:44:42 +00:00
Badlop
c3bda4aaee * doc/guide.tex: Update Process-one name to ProcessOne (EJAB-708)
* doc/guide.html: Likewise
* doc/api/overview.edoc: Likewise
* src/*/*.erl: Likewise
* src/*/*.hrl: Likewise
* src/*/*.c: Likewise
* src/odbc/*.sql: Likewise

SVN Revision: 1499
2008-07-31 11:18:49 +00:00
Christophe Romain
b2bd9759c8 Rewrite io:format calls to loglevel macros (EJAB-555)
SVN Revision: 1239
2008-03-21 14:44:16 +00:00
Badlop
2d2fcc8210 * doc/guide.tex: Updated copyright dates to 2008
* src/*: Likewise

SVN Revision: 1153
2008-01-15 17:02:57 +00:00
Mickaël Rémond
56fe3579bb * Applied copyright update patch 1.
SVN Revision: 1110
2007-12-24 11:41:41 +00:00
Badlop
d625fc80fc * src/acl.erl and other 64 files: Remove Erlang module attribute
'vsn' because it doesn't provide any worth feature, and it
difficults hot code update (EJAB-440)

SVN Revision: 1044
2007-12-06 22:12:27 +00:00
Mickaël Rémond
2100ea63ca * Making sure SVN properties are correctly set.
SVN Revision: 970
2007-11-15 10:33:18 +00:00
Mickaël Rémond
beb3a450f0 * src/ejabberd_loglevel.erl: Preliminary dynamic loglevel support.
Debug can be enabled with the command "ejabberd_loglevel:set(5)".
(EJAB-74)
* src/ejabberd_app.erl: Likewise.
* src/ejabberd.hrl: Likewise (More log levels are now supported).
* src/ram_file_io_server.erl: Likewise (Needed to dynamically
recompile the error logger).

SVN Revision: 689
2006-12-04 16:07:44 +00:00