DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Error log information on text file

Solved!
Go to solution

Hi,

 

How can I write DIAdem error log information on text file saved on user defined location?

 

Whenever I run a particular script, wants to save a separate error log file, related to this script on a new text file and save it on a defined location. Log file should contain errors related to running that particular script alone.

 

regards,

Durai

0 Kudos
Message 1 of 4
(747 Views)

Hi Durai26,

you can use TextFileOpen() with the attribute "eTextFileAttributeLogDIAdemMsg". DIAdem then writes the logfile entries additionally into this file.

 

Greetings,

DIAdemo

0 Kudos
Message 2 of 4
(687 Views)

Hi,

 

Thanks for your reply.

 

I am not much familiar with this scripting. can you share some lines to get a copy of DIAdem log file saved in user directory.

 

Our diadem runs multiple scripts. There is a master file which in turn runs multiple sub files. want to capture the overall log information on external text file. Since multiple scripts files are involved, Intention is to know on which file and what was the error.

 

thanks in advance for your support.

 

regards,

Durai

0 Kudos
Message 3 of 4
(638 Views)
Solution
Accepted by topic author Durai26

Hello Durai,

 

here is a small example of how to do it.
I hope this helps you.
Greetings
DIAdemo

 

'-------------------------------------------------------------------------------
Option Explicit 'Forces the explicit declaration of all the variables in a script.
Dim MyFileHandle

MyFileHandle = TextFileOpen("C:\temp\DIAdem_Testlog.txt", TfCreate or TfWrite or TfDenynone or tfLogDIAdemMsg )
TextfileWriteLn MyFileHandle,"This is how you write directly to your log file."
Logfilewrite "Outputs to the DIAdem log file are also written to your log file."
on error resume next ' Suppress abort due to error
r1 = "ABC" ' This is an error, it also appears in the log file.
TextfileWriteLn MyFileHandle,"It's as simple as that."
TextFileClose(MyFileHandle)

 

Message 4 of 4
(631 Views)