Advertisement
Ocawesome101

Screen log

Jul 10th, 2019
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. -- A simple logging API --
  2.  
  3. function info(msg)
  4. term.write('[ ')
  5. term.setTextColor(colors.green)
  6. term.write('OK')
  7. term.setTextColor(colors.white)
  8. term.write(' ] '..msg)
  9. print(' ')
  10. sleep(0.01)
  11. end
  12.  
  13. function warn(msg)
  14. term.write('[ ')
  15. term.setTextColor(colors.orange)
  16. term.write('WARN')
  17. term.setTextColor(colors.white)
  18. term.write(' ] '..msg)
  19. print(' ')
  20. sleep(0.01)
  21. end
  22.  
  23. function err(msg)
  24. term.write('[ ')
  25. term.setTextColor(colors.red)
  26. term.write('ERROR')
  27. term.setTextColor(colors.white)
  28. term.write(' ] '..msg)
  29. print(' ')
  30. sleep(0.01)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement