'Get the database\'s current profiling level.
Returns one of (:data:`~pymongo.OFF`,
:data:`~pymongo.SLOW_ONLY`, :data:`~pymongo.ALL`).
.. mongodoc:: profiling'

def profiling_level(self):

    result = self.command('profile', (-1))
    assert ((result['was'] >= 0) and (result['was'] <= 2))
    return result['was']
