On Fri, 2009-11-27 at 15:08 -0500, Kaiduan Xie wrote:
> Thank you Fredrik for the clarification on the rationale.
You are most welcome.
> In fact, spawning a process for each request is not creating
> performance bottleneck at all. I just want to understand the reason.
> Logger creates a lot of overhead in the code. Now no matter if the log
> level is big enough, YXA formats the message. I would like to see a
> log level in configuration, and check the log level before formatting
> the message. Ejabberd has nice way to do the log, it only reads the
> log level from configuration when system is up, and generates a module
> to handle the log. Whenever you need to log, it does not read from the
> configuration anymore. Anytime, you change the log level, it dynamic
> generates the logger module.
Yes, (debug) logging is expensive in YXA today.
Ejabberd's solution sounds neat, but I think it should be measured
against the much simpler variant of adding a case statement checking the
log level before calling format_msg in logger:do_log/3.
Patches are always welcome.
Yxa-devel mailing list