Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOG_FILE_NAME = "debug.log"
- function log(txt)
- local hFile
- if fs.exists(LOG_FILE_NAME) then
- hFile = fs.open(LOG_FILE_NAME, "a")
- else
- hFile = fs.open(LOG_FILE_NAME, "w")
- end
- hFile.writeLine(txt)
- hFile.close()
- end
Add Comment
Please, Sign In to add comment