Moved logging code to use options ChainMap.