adding ability to set the trace option to some custom tracecode

Overloaded `trace` option to accept string and functions which can provide a custom tracecode to be used in the logger.

should address #9 

When/if merged, the new functionality will need to be updated / added in the main repo wiki. FYI i was going to do this in the README.md which might make more sense as it can be pushed back on the contributor to update the docs at the same time as adding/changing functionality