in reply to creating log file question

Using the Log::Log4perl framework, you can use two appenders as output for your log messages: Log::Log4perl::Appender::File and Log::Log4perl::Appender::TestBuffer. If the latter is too generic, you can add your own appender as described here.