Ocawesome101

Log

Jul 9th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. -- Defines some logging functions used in OC-OS --
  2. function warn(message)
  3.  write(' [ ')
  4.  term.setTextColor(colors.orange)
  5.  write('WARN')
  6.  term.setTextColor(colors.white)
  7.  write(' ] '..message..'\n')
  8. end
  9.  
  10. function err(message)
  11.  write(' [ ')
  12.  term.setTextColor(colors.red)
  13.  write('ERROR')
  14.  term.setTextColor(colors.white)
  15.  write(' ] '..message..'\n')
  16. end
  17.  
  18. function info(message)
  19.  write(' [ ')
  20.  term.setTextColor(colors.green)
  21.  write('OK')
  22.  term.setTextColor(colors.white)
  23.  write(' ] '..message..'\n')
  24. end
Add Comment
Please, Sign In to add comment