class_docstr: Base class for server nodes in a distributed cluster.
docstr: Fetch log entries for this node
  
  Parameters
  ----------
  start : float, optional
      A time (in seconds) to begin filtering log entries from
  n : int, optional
      Maximum number of log entries to return from filtered results
  timestamps : bool, default False
      Do we want log entries to include the time they were generated?
  
  Returns
  -------
  List of tuples containing the log level, message, and (optional) timestamp for each filtered entry, newest first
docstr_tok: ["Fetch","log","entries","for","this","node","Parameters","--","--","--","--","--","start",":","float",",","optional","A","time","(","in","seconds",")","to","begin","filtering","log","entries","from","n",":","int",",","optional","Maximum","number","of","log","entries","to","return","from","filtered","results","timestamps",":","bool",",","default","False","Do","we","want","log","entries","to","include","the","time","they","were","generated","?","Returns","--","--","--","-","List","of","tuples","containing","the","log","level",",","message",",","and","(","optional",")","timestamp","for","each","filtered","entry",",","newest","first"]
code: def get_logs(self, start=0, n=None, timestamps=False):
      """
      Fetch log entries for this node
  
      Parameters
      ----------
      start : float, optional
          A time (in seconds) to begin filtering log entries from
      n : int, optional
          Maximum number of log entries to return from filtered results
      timestamps : bool, default False
          Do we want log entries to include the time they were generated?
  
      Returns
      -------
      List of tuples containing the log level, message, and (optional) timestamp for each filtered entry, newest first
      """
      deque_handler = self._deque_handler
  
      L = []
      for count, msg in enumerate(reversed(deque_handler.deque)):
          if n and count >= n or msg.created < start:
              break
          if timestamps:
              L.append(
                  (
                      msg.created,
                      msg.levelname,
                      deque_handler.format(msg),
                  )
              )
          else:
              L.append((msg.levelname, deque_handler.format(msg)))
      return L
  
imports: from __future__ import annotations
  import logging
  import ssl
  import warnings
  import weakref
  from contextlib import suppress
  import tlz
  from tornado.httpserver import HTTPServer
  import dask
  from distributed.comm import get_address_host, get_tcp_server_addresses
  from distributed.core import Server
  from distributed.http.routing import RoutingApplication
  from distributed.utils import DequeHandler, clean_dashboard_address
  from distributed.versions import get_versions
label_desc: Use image node_id 6 for calling the ServerNode obj's underlying member method code with example usage: obj.get_logs(start, n, timestamps) and returns: L