You can configure code to be executed at specific points in a mapping - conditionally if required. For example:

Before mapping of a specified type begins:

    .To<Customer>() // Apply to Customer creation, updates and merges
    .Call(ctx => Console.WriteLine(
        "Mapping customer " + ctx.Target.CustomerId));

Before an instance of a specified type is created:

    .From<AddressDto>() // Apply to AddressDto mappings
    .ToANew<Address>()  // Apply to Address creation
    .Call((dto, a) => dto.Line1 = dto.HouseNum + " " + dto.Line1);

After an instance of a specified type is created:

    .Call((o, a) => Console.WriteLine(
        $"Created Address {a.AddressId} from {o.GetType()}"));

On either side of the mapping of a particular member:

    .From<Person>()   // Apply to Person mappings
    .Over<PersonVm>() // Apply to PersonVm updates
    .Mapping(pvm => pvm.Name)
    .Call((p, pvm) => p.Name = p.Name ?? string.Empty)
    .Mapping(pvm => pvm.Name)
    .Call((p, pvm) => pvm.Name = p.Title + " " + pvm.Name);

At the end of any mapping (conditionally):

    .If(ctx => Debug.Listeners.Count > 0)
    .Call((s, t) => Debug.Print(
        $"Mapped a {s.GetType()} to a {t.GetType()}"));