Logging

i know, but this is quick, and very easy to read. it also prevents needing to map numbers to log levels and back to numbers again. happy to change `loglevel` to something else, but really if i need to change this too much (like the stupid port check stuff PR comments) then i will just install this branch from github and we won't have logging in master.