Developer forum

Forum » Integration » No data in DataIntegration log file

No data in DataIntegration log file

Lars Larsen
Lars Larsen
Reply

Hi

I have made a Scheduled Task Addin using the Dynamicweb Templates Extension for Visual Studio. The addin runs fine, but there is no data in the log (\Files\System\Log\DataIntegration\[ScheduledTaskAddinName TimeStamp].log) after the task has runned. I have checked "Log all requests and responses" in the task. I have not modified anything in the addin regarding logging that comes from the template. What can be the problem?

Running v9.8.8


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Lars,
could you check the logs in the Files/System/Log/ScheduledTasks folder?
Kind regards, Dmitrij

 
Lars Larsen
Lars Larsen
Reply

Hi Dmitriy

There is data in the log for the scheduled task:

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Lars,
it looks like there is no content in the DI job log, so maybe that is why the file was not created. Could you check if the DI job has been run and has some actions done(exported/imported) while Scheduled task was run?
Regards, Dmitrij

 
Lars Larsen
Lars Larsen
Reply

Hi Dmitriy

The DI job has runned, because I can see that data has been updated in the backend as expected. When I ran the DI job manually then this log was created in the Files\System\Log\DataIntegration folder:

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Lars,
can you attach your add-in source code here?

 
Lars Larsen
Lars Larsen
Reply

Hi Dmitriy

I would rater prefer sending it to you. Will you send me an email then I can respond to that. Thanks

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

dbe@dynamicweb-cms.com

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Lars,
Try to replace this line:
Job jobToRun = new Job(Context.Current.Server.MapPath("/Files/" + Dynamicweb.Content.Files.FilesAndFolders.GetFilesFolderName() + "/Integration/jobs/") + job + ".xml", logFileFullPath);
with:
Path.GetFileName(logFileFullPath), so it looks like that:
Job job = new Job(Context.Current.Server.MapPath("/Files/" + Dynamicweb.Content.Files.FilesAndFolders.GetFilesFolderName() + "/Integration/jobs/") + job + ".xml", Path.GetFileName(logFileFullPath));
Regards, Dmitrij

Votes for this answer: 1
 
Lars Larsen
Lars Larsen
Reply

Hi Dimitry

That did the trick. Thanks a lot smiley

 

You must be logged in to post in the forum