Logging implementation

Related to #15.