logname implementation

Fixes #104.