Question

We have a perl web interface that I am currently working on to slowly convert to using Dancer 2 and PSGI instead of our slow old plain vanilla CGI model.

In our old model, we stored everything in sessions -- the history of what the users did, the call stacks, the data inputs, ........ you get the idea.

We do not want to do it that way anymore so that we can keep the sessions small and efficient. BUT, we'd still like to log just what the users have been doing (that way when an error gets reported we can see what they did to get to the error, what input(s) they put in, etc).

I looked at Logging on Dancer2 documentation, but this doesn't seem to quite get to what we need - this would only record Dancer2 messages + what other messages I put in. This one that I found Dancer2::Logger doesn't seem to quite cut it either.

What other libraries could I use to do what I need? I seriously doubt that perl does NOT have somethign that does this so...

Was it helpful?

Solution

Just off the top of my head, I can think of Log::log4perl and Log::Dispatch, though there are myriad others.

You can use them to establish your own log files, separate from dancer's log.

As for the best way, most logging interfaces have the same api for logging, but differ in run-time instantiation, and configuration syntax. So read the docs on a few of them and maybe try a couple out on for size.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top