Log rotation in a sharded cluster

Hi guys

Quick question, how does log rotation works in a sharded cluster?, if I run the command in the mongos interface it will work in all shards and config? or should I run it node by node on each shard and config server?