how to add logging of exception using auditor

Posts   
 
    
vairam2008
User
Posts: 86
Joined: 11-Mar-2008
# Posted on: 09-Apr-2008 20:02:32   

can we use auditor object for exception handling, if yes how to consume the corresponding auditor object, if the exception occurs in the validator or any other related object

I want to scope all of these to use MerchandiseConsumerAuditor.

ConsumerEntity MerchandiseConsumerValidator MerchandiseConsumerAuthorizer

Or should I go the route of using log4net or enterprise log application block?

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 10-Apr-2008 12:56:19   

The auditor can only handle the following actions:

1- Setting a field value. 2- De-referencing a related entity. 3- Referencing a related entity. 4- Saving a new entity. 5- Updating an existing entity. 6- Deleting an entity. 7- Getting a field value. 8- Loading an entity.

can we use auditor object for exception handling

So, the answer is no.

vairam2008
User
Posts: 86
Joined: 11-Mar-2008
# Posted on: 10-Apr-2008 22:29:58   

I don't know if I put the question correctly. Can we use Auditor for logging including exceptions? If no, how to plugin the log4net object as a dependency object

thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 21-Apr-2008 06:08:40   

Hi Vairam,

LLBLGenPro Validation feature don't listen for exceptions to be trapped and logged. You should be that is some place, for example catch your involved exception at some point (BLL, GUI, etc.) and log it manually using some validation extension code.

So LLBLGen is about Entities, no exceptions. Even if you use log4net you should at some point catch the exception and log it.

David Elizondo | LLBLGen Support Team