Log

class qbittorrentapi.LogAPIMixIn(host='', port=None, username=None, password=None, **kwargs)

Implementation of all Log API methods.

log_main(normal=None, info=None, warning=None, critical=None, last_known_id=None, **kwargs)

Retrieve the qBittorrent log entries. Iterate over returned object.

Parameters:
  • normal – False to exclude ‘normal’ entries
  • info – False to exclude ‘info’ entries
  • warning – False to exclude ‘warning’ entries
  • critical – False to exclude ‘critical’ entries
  • last_known_id – only entries with an ID greater than this value will be returned
Returns:

List of log entries.

log_peers(last_known_id=None, **kwargs)

Retrieve qBittorrent peer log.

Parameters:last_known_id – only entries with an ID greater than this value will be returned
Returns:list of log entries in a List
class qbittorrentapi.Log(client)

Allows interaction with “Log” API endpoints.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host='localhost:8080', username='admin', password='adminadmin')
>>> # this is all the same attributes that are available as named in the
>>> #  endpoints or the more pythonic names in Client (with or without 'log_' prepended)
>>> log_list = client.log.main()
>>> peers_list = client.log.peers(hash='...')
>>> # can also filter log down with additional attributes
>>> log_info = client.log.main.info(last_known_id='...')
>>> log_warning = client.log.main.warning(last_known_id='...')
peers(last_known_id=None, **kwargs)