Debugging messages not appearing in nodes .log file
I'm using ROS Melodic Morenia on Ubuntu 18.04 with kernel 5.0.0-29-generic.
I'm trying to set up logging as part of a my ROS nodes, but rospy.logdebug() messages do not appear in the nodes log file.
Simple python script to test logging (run with python 3.6.8):
import rospy
rospy.init_node('testnode')
rospy.loginfo('info message')
rospy.logdebug('debug message')
Contents of ~/.ros/log/testnode.log:
[rospy.client][INFO] 2019-10-15 14:45:51,623: init_node, name[/testnode], pid[7420]
[xmlrpc][INFO] 2019-10-15 14:45:51,623: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2019-10-15 14:45:51,623: Started XML-RPC server [http://bjoernolav-ubuntu-18:34229/]
[rospy.init][INFO] 2019-10-15 14:45:51,623: ROS Slave URI: [http://bjoernolav-ubuntu-18:34229/]
[rospy.impl.masterslave][INFO] 2019-10-15 14:45:51,623: _ready: http://bjoernolav-ubuntu-18:34229/
[rospy.registration][INFO] 2019-10-15 14:45:51,624: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2019-10-15 14:45:51,624: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2019-10-15 14:45:51,724: registered with master
[rospy.rosout][INFO] 2019-10-15 14:45:51,724: initializing /rosout core topic
[rospy.rosout][INFO] 2019-10-15 14:45:51,729: connected to core topic /rosout
[rospy.simtime][INFO] 2019-10-15 14:45:51,731: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic
[rosout][INFO] 2019-10-15 14:45:51,734: info message
[rospy.internal][INFO] 2019-10-15 14:45:51,937: topic[/rosout] adding connection to [/rosout], count 0
[rospy.core][INFO] 2019-10-15 14:45:56,062: signal_shutdown [atexit]
[rospy.internal][INFO] 2019-10-15 14:45:56,068: topic[/rosout] removing connection to /rosout
[rospy.impl.masterslave][INFO] 2019-10-15 14:45:56,068: atexit
From what i understand from http://wiki.ros.org/rospy/Overview/Lo..., all verbose levels should be logged in the nodes .log file. Something obviously works since the rospy.loginfo message gets written to the file, but not the rospy.logdebug message.