class_docstr: Base logger handler. See implementations: TensorboardLogger, VisdomLogger, PolyaxonLogger, MLflowLogger, ...
class_docstr_tok: ["Base","logger","handler",".","See","implementations",":","TensorboardLogger",",","VisdomLogger",",","PolyaxonLogger",",","MLflowLogger",",","..."]
docstr: Shortcut method to attach `OutputHandler` to the logger.
  
  Args:
      engine: engine object.
      event_name: event to attach the logging handler to. Valid events are from
          :class:`~ignite.engine.events.Events` or any `event_name` added by
          :meth:`~ignite.engine.engine.Engine.register_events`.
      args: args to initialize `OutputHandler`
      kwargs: kwargs to initialize `OutputHandler`
  
  Returns:
      :class:`~ignite.engine.events.RemovableEventHandle`, which can be used to remove the handler.
docstr_tok: ["Shortcut","method","to","attach","`","OutputHandler","`","to","the","logger",".","Args",":","engine",":","engine","object",".","event_name",":","event","to","attach","the","logging","handler","to",".","Valid","events","are","from",":","class",":","`","~ignite.engine.events.Events","`","or","any","`","event_name","`","added","by",":","meth",":","`","~ignite.engine.engine.Engine.register_events","`",".","args",":","args","to","initialize","`","OutputHandler","`","kwargs",":","kwargs","to","initialize","`","OutputHandler","`","Returns",":",":","class",":","`","~ignite.engine.events.RemovableEventHandle","`",",","which","can","be","used","to","remove","the","handler","."]
code: def attach_output_handler(
      self, engine: Engine, event_name: Any, *args: Any, **kwargs: Any
  ) -> RemovableEventHandle:
      """Shortcut method to attach `OutputHandler` to the logger.
  
      Args:
          engine: engine object.
          event_name: event to attach the logging handler to. Valid events are from
              :class:`~ignite.engine.events.Events` or any `event_name` added by
              :meth:`~ignite.engine.engine.Engine.register_events`.
          args: args to initialize `OutputHandler`
          kwargs: kwargs to initialize `OutputHandler`
  
      Returns:
          :class:`~ignite.engine.events.RemovableEventHandle`, which can be used to remove the handler.
      """
      return self.attach(
          engine,
          self._create_output_handler(*args, **kwargs),
          event_name=event_name,
      )
  
imports: import numbers
  import warnings
  from abc import ABCMeta, abstractmethod
  from collections import OrderedDict
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  from torch.optim import Optimizer
  from ignite.engine import Engine, Events, EventsList, State
  from ignite.engine.events import CallableEventWithFilter, RemovableEventHandle
label_desc: Use image node_id 2 for calling the BaseLogger obj's underlying member method code with example usage: obj.attach_output_handler(engine, event_name) and returns: self