Permalink
Browse files

doc update

  • Loading branch information...
1 parent e10903c commit a577a27fc59d5215c937ff61ecdd6d45807e33c7 @ahmednawras committed May 2, 2009
Showing with 30 additions and 3 deletions.
  1. +20 −0 API.txt
  2. +10 −3 README.txt
View
20 API.txt
@@ -130,3 +130,23 @@ Furthermore, you can find appenders and their configurations in 'Appenders_API.t
log4erl:fatal(chat_log, "exception occured").
log4erl:debug(chat_log, "message received is ~p", [Msg]).
log4erl:error("Error").
+
+**> log4erl:error_logger_handler() -> ok
+ log4erl:error_logger_handler(Mappings) -> ok
+ where
+ Mappings :: [Mapping]
+ Mapping :: {Elevels, level}
+ ELevels :: error | info_msg | warning_msg | error_report | info_report | warning_report
+
+ Mappings basically is a list of mapping between error_logger log levels and log4erl log levels.
+ Currently, report messages are not handled by this error_logger handler. The default Mappings are:
+ {error=error, info_msg=info, warning_msg=warn,
+ error_report=error, info_report=info,
+ warning_report=warn}
+
+ Example:
+ log4erl:error_logger_handler([{error, fatal}, {info_msg, info}]).
+
+ which treats all error messages coming from error_logger as fatal and all info_msg
+ messages coming from error_logger as info.
+
View
@@ -10,18 +10,22 @@ TOC:
5. Configuration
6. Known issues
7. Future development
-8. License
+8. Acknowledgments
+9. License
1. FEATURES:
============
- Multiple logs
- Currently, only size-based log rotation of files for file appender
- Support default logger if no logger specified
- 5 predifined log levels (debug, info, warn, error, fatal)
+- A log handler for error_logger
- Support for user-specified log levels
- Support for a log formatter (similar to Layouts in Log4J)
- Support for console log
- Support for smtp formatter
+- Support for XML logs
+- Support for syslog
- Support for changing format and level of appender during run-time
2. INSTALLATION:
@@ -91,15 +95,18 @@ Please look at CONFIGURATION.txt for more information about how to configure log
7. FUTURE DEVELOPMENT:
======================
-- Add support for extensive file-based configuration
- Add support for different log persistance methods (e.g files, XML, console, DB, SNMP, syslog...etc)
- Add support for time-based log rotation
- Multiple configuration format (Erlang terms, XML?, properties files?)
- Add support for NDC & MDC ???
Please send your suggestion to ahmed.nawras <at @ at> gmail <dot . dot> com
-8. LICENSE:
+8. ACKNOWLEDGEMENT:
+===================
+The following has contributed to log4erl
+
+9. LICENSE:
===========
This software is subject to "Mozilla Public License 1.1". You can find the license terms
in the file 'LICENSE.txt' shipping along with the source code. You may also get a copy

0 comments on commit a577a27

Please sign in to comment.