Added Lock for all events

Lock is added for all Events
Added logs pattern
Changed TopoDb getPort and getSwitch