Extract log functions
Regroup function with same perimeter and add comments
Add function doc string
Format log strings construction