User's Manual

Select Case Left$(g_log_path, 3)
Case C:\
g_log_path = D:\ + Mid$(g_log_path, 4)
lab_log_path = & g_log_path
Case D:\
g_log_path = C:\ + Mid$(g_log_path, 4)
lab_log_path = & g_log_path
Case Else
g_log_path = C:\ + Mid$(g_log_path, 4)
lab_log_path = & g_log_path
End Select
End If
Err = 0
' make D:\SOPHO Messenger@Net
lcl_path = g_log_path
If Len(Dir$(lcl_path, vbDirectory)) = 0 Then
MkDir lcl_path
End If
' make D:\SOPHO Messenger@Net\log
lcl_path = lcl_path + \log
If Len(Dir$(lcl_path, vbDirectory)) = 0 Then
MkDir lcl_path
End If
' make D:\SOPHO messenger@Net\log\02001_eAPI
lcl_path = lcl_path + \ + Format$(g_ekernel_remote_port, 00000) + _eAPI
If Len(Dir$(lcl_path, vbDirectory)) = 0 Then
MkDir lcl_path
End If
' Kill log-files older then x days if g_LastLogFile not today
If Mid$(g_LastLogFile, 1, 8) <> Format$(Now, yyyymmdd) Then
eAPI_form - 8
KILL_OLD_LOGFILES lcl_path
End If
' make 20001030.txt
lcl_file = Format$(Now, yyyymmdd) & .txt
g_LastLogFile = lcl_file
' open file D:\SOPHO messenger@Net\log\02001_eAPI\20001030txt
Open lcl_path & \ & lcl_file For Append As 1
' write log record
Print #1, Format$(Now, dd/mm/yyyy hh:mm:ss) & - & log_type & : & log_sts & : &
log_dta
' close log file
Close 1
' disable error recovery
On Error GoTo 0
End Sub
DECT Messenger Installation and Commissioning — Book 1 March 2012 79