You can give the record command multiple topics (ie. rosbag record /topic_a /topic_b) and it will record all of them into the same bag. You can also use the '-e' flag to record all topics matching some regular expression. If you find yourself always recording the same set of topics for debugging or data collection, you can start the rosbag record command from a launch file. Many projects will set up launch files with topic sets they use frequently. Just set pkg to 'rosbag' and type to 'record', then use the arguments attribute to pass in the topics and settings you'd like to use.
@@robojacketstraining6059 thanks so much. I did do this but then the rosbag file always ends up corrupted. So i just printed the messages directly to a text file. Like a jump over solution.