Extending standard libary to include levels and send to mail via smtp
// Switch between log levels
// Level 0 No Logging at all
// Level 1 output all to screen, is also default
// Level 2 info, warn & error to screen, debug to file
// Level 3 warn & error to screen, debug and info to file
// Level 4 warn & error to file
// Level 5 error to file
// Level 6 warn & error to mail
// Level 7 error to mail