What determines if a moderation action shows up in the modlog or not?

Sometimes I’ll see a post deleted by a mod but there won’t be a corresponding modlog entry for it.

Is logging at the discretion of the mod at the time of the action or are certain types of moderation intentionally hidden for safety? Some quirk of federation?