Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Management
#8
If need to collect all warnings of current thread, and then write to file when the thread ends, I would use ICsv variable with thread scope.

Function LogWarning
Code:
Copy      Help
;/
function $text

str s1 s2 s3(text)
s1="time"
s2.getmacro(getopt(itemid 1) 1)

ICsv- t_logErr=CreateCsv(1)
t_logErr.AddRowSA(-1 3 &s1)

Function LogErrors
Code:
Copy      Help
ICsv- t_logErr=CreateCsv(1)

;then append error or success to t_logErr, like in LogWarning

;then append all to file
lock 0 "QM_mutex_LogErrors"
t_logErr.ToFile("$desktop$\errorlog.csv" 1)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)