Write my own log from the rule

Take a look at the above. Should give you some ideas