Microsoft interview question

implement logger in any coding language