keychain api details.
moved toLog into util.