Which logging module is used in Perl AnyEvent?

I use the wonderful AnyEvent to create an asynchronous TCP server (in particular, a MUD server).

In order for everything to work smoothly and with a minimum number of blocking / synchronous code fragments, I replaced some of the modules that I used with their asynchronous copy, for example AnyEvent :: Memcached and AnyEvent :: Gearman . This allows the main program to be pretty fast, which is desirable. I encoded around the need for some of these calls to be synchronous.

One of the problems that I have at present, and the main focus on this issue, is registration.

Before accessing AnyEvent for this server program, I used Log :: Log4perl , because it allows me to configure which modules or routines should be registered, at what level and at what log output (screen, file, etc.).

The problem is that Log4perl actions (warn, info, etc.) are currently being executed synchronously, but I have no requirement for this, as long as the log lines end up on the screen / file (and in the correct order).

Is Log :: Log4perl still the right choice when using an asynchronous event handler like AnyEvent, or do I need to look at another module? If so, what is recommended?

+5
source share
2

AnyEvent:: Log, AnyEvent, AnyEvent:: IO, , IO:: AIO ( , ).

+2

? IO ( /stdout ..), , , / , Log4perl .

Log:: Log4perl:: Appender:: Buffer , , appender .

+2

All Articles