implement python logger