Unfortunately it looks like trainer was an undocumented portion of PyTorch that has been removed (see this forum post 18 and this GitHub comment 12).  The same forum post recommends TNT 8 and also points to an older forum post 1.
However, all of this is from 2017.  I’m not entirely sure what Logger did, but you could check out fast.ai's codebase 2, which allows for metrics and callbacks.  I hope that helps a bit!