Data Recording to simple text file
I am a newbie here, just started working on ROS a week ago. Is there any way to record /save some data into a simple text file directly from the server or client? I want to record the request received by the server, alternatively can anybody give example of this implemented by rosbag ? The basic c++ methods of fstream and ofstream do not work in ROS.