You can find clear example in the Log::Log4perl documentation
In reply to Re^2: How to create a log file? by zwon in thread How to create a log file? by anurag_perl