added optional logdata to logshmim