code for generating SE log