It seems that Supergirl will not find out about James Olsen being Guardian right away when the show returns on January 23rd. In talking with TVline, actor Mehcad Brooks mentioned a little rivalry between Kara (Melissa Benoist) and James over coverage of their alter egos:
I'm writing my article on how amazing the Guardian is and how he stopped the crime, and Kara's writing her article about Supergirl. We're having a secret war. It's just a little funny scene where both of us are trying to push our agendas.
As for the how she will learn, all the actor said was:
[Kara] finds out in a very dramatic fashion that James is the Guardian.
Dramatic fashion? I guess we can rule out him texting her a selfie of himself in the armor.