Forum Discussion
3 Replies
- shankar_rCommunity Hero
I used to use the Log option as like below in-order to get the Unit name of the script.
In my event handler, I will have different set of Log attributes based on the Unit name and handle it different way.
function test() { Log.Error("text box is enabled in the login screen","LoginUtility"); } function GeneralEvents_OnLogError(Sender, LogParams) { if(LogParams.AdditionalText == "LoginUtility") { aqFile.WriteToTextFile(Project.Path + "login-logs",LogParams.MessageText,aqFile.ctANSI); } }I maybe misunderstood the question :)
- tristaanogreEsteemed Contributor
Not sure you can with the OnLogError or OnLogEvent event handler. All that can do is work with the log entry as it stands. There's not much more information passed in to the event handler than what is written to the log. So, if there is some way you can write to the log something different depending upon the circumstances of the event, then you can use those event handlers.
- shankar_rCommunity Hero
***DUPLICATE*****