.Net logwriter failed to write to log file causing subsequent batch processing to fail

One of the vendor written application (using .Net) was not able to
proceed to do batch processing when it fails to write to a logfile
(as writing to logfile is done first before it can proceed to do the
 batch processing):

I'm currently checking for the log filename & the ownership of
the log from the programmer.

Below is the error / messages:

=========================================================

Application: XXX.eConnect.BatchJob.Executor.exe

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Practices.ServiceLocation.ActivationException
Stack:
   at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.get_Writer()
   at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write (Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry)
   at XXX.eConnect.BatchJob.BatchJobUtility.TraceInfo(System.String, System.String, System.String)
   at XXX.eConnect.BatchJob.Executor.Program.Main(System.String[])
sunhuxAsked:
Who is Participating?
 
Easwaran ParamasivamCommented:
Wrap the Logging method using try.. catch and handle the exception accordingly.
0
 
sunhuxAuthor Commented:
can you give me a sample code of how you would do "wrap the Logging"
& handle the exception?
0
 
sunhuxAuthor Commented:
Attached the portion of codes which our programmer suspect:
just trying my luck to see if the attached screen will give any clue
dotNetLogwriter.jpg
0
 
sunhuxAuthor Commented:
Not quite address the issue
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.