Adding a shouldLog method

Adding a shouldLog. Also allow the behaviour of showLog to be changed system-wide.