outputting lammps random numbers

Dear lammps users
I need to calculate some quantity that depends on the random numbers generated in fix langevin during a run.
I was wondering if lammps has some sort of internal function for that ? what I am doing so far is that I just wrote a fix which outputs the numbers to a text file given the same seed, but I am guessing that is horribly inefficient and just slows my simulations.
Cheers!
Taj

The random numbers used inside FixLangevin are just
generated there, used, and discarded. There are a lot
of them, three per atom per timestep. If you want to
see them or write them to a file, you’ll need to add some
code to fix_langevin.cpp. Search for “random”, You will
see where the RNG is initialized with a seed (different on every
proc), and called via random->uniform().

Steve