tags:

views:

12

answers:

1

Hi guys,

We have a current implementation of a log file manager where it's two main purposes are to 1. rename files generated by other programs with a date/time stamp so they create new ones, and 2. delete files older then X amount of days from a specified folder. The program also makes it's own log file which records when these events happen.

Do you think the Logging Application Block would be useful in this instance? The old file manager is written in VB 6.0 and an upgrade to VB .Net would not take too long, but is it worth it to try and implement LAP into it?

Thanks

A: 

The logging application block is very custimizable and you can log to several sources; file, eventlog, message queue.

The question is, do you need this, or do you need to simply append to a file? If you don't need the flexibility, I would roll my own file appender with a lock to prevent threading issues.

If you need more advanced logging with filters etc, go for the LAP or log4net which is easier to set up imo.

Choose the right tool for the task, don't go overboard, but make sure it's flexible enough to change when the need arrives.

Mikael Svenson