generateSlog method. Fixes #297