Found it it the Tooling API - TraceFlag
• To set up a log for a specific user, set ScopeId to null and TracedEntityId to the ID of the user. This option can only be configured for a user, not an Apex class or Apex trigger.
• To configure logging levels for system logs (visible only to you), set ScopeId to user and TracedEntityId to the ID of the logged-in user.
• To set up a system log (visible only to you) for a specific Apex class or trigger, set ScopeId to user and TracedEntityId to the ID of the Apex class or trigger.