Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OUT Wrapper
#1
Obviously this is very very simple, i use this for two reasons, the first is that i want a timestamp on everything without duplicating that code everwhere, and the second is that at some point in my current project i am going to log all the output text to a seperate console window or file and i will just be able to make any changes to that here instead of massive refactoring all over the place. Might be a smart idea to modify it to accept a formatstring and args instead of straight text.

Function outmsg
Code:
Copy      Help
// Formats debug messages with timestamp
function str'msg
out _s.from(_s.time("MM/dd/yyyy" "HH:mm:ss") " : " msg)

Usage: outmsg("something to say")


Forum Jump:


Users browsing this thread: 1 Guest(s)