Skip to content

Commit

Permalink
Remove Shell echo. Replace to open file for write append or create
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jul 28, 2014
1 parent 00b2a9f commit e1a0fa7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions I-Nex/i-nex/.src/Logger.class
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,17 @@ Private Sub Format_Write(Value As String)
End

Private Sub _Write(sLine As String)

Dim LOG_FILE As File
If $sOutput = ":stdout" Then
Print sLine
If Access("/tmp/", gb.Write) = True Then
Shell "echo '" & sLine & "' >>/tmp" &/ Application.Name & ".log"
If Exist("/tmp/" & Application.Name & ".log") Then
LOG_FILE = Open "/tmp/" & Application.Name & ".log" For Write Append
Else
LOG_FILE = Open "/tmp/" & Application.Name & ".log" For Write Create
Endif
Write #LOG_FILE, sLine
Close #LOG_FILE
Endif
Else
Print #$sLogFile, sLine
Expand Down

0 comments on commit e1a0fa7

Please sign in to comment.