In Drupal 8 with DbLog logger, I am trying to log some audit messages to a different user than the currently logged-in user. Unfortunately, it looks like something is overwriting my context.
\Drupal::logger("proreos")->info("bla", ['uid' => 5]); and
\Drupal::logger("proreos")->info("bla", ['user' => User::load(5)]);, but neither of them worked. In both the cases, the current user ID was instead used.
How can I use a different user ID?
To clarify: This is not about logging another uid, it is about assigning the row in watchdog to a different user.