diff --git a/examples/contrib/mnist/mnist_with_neptune_logger.py b/examples/contrib/mnist/mnist_with_neptune_logger.py
index da15189b..11cedc0f 100644
--- a/examples/contrib/mnist/mnist_with_neptune_logger.py
+++ b/examples/contrib/mnist/mnist_with_neptune_logger.py
@@ -17,25 +17,21 @@ Note:
     You can see an example experiment here:
     https://ui.neptune.ai/o/shared/org/pytorch-ignite-integration/e/PYTOR-26/charts
 """
-import sys
 from argparse import ArgumentParser
-import logging
 
 import torch
-from torch.utils.data import DataLoader
-from torch import nn
 import torch.nn.functional as F
+from torch import nn
 from torch.optim import SGD
+from torch.utils.data import DataLoader
 from torchvision.datasets import MNIST
 from torchvision.transforms import Compose, ToTensor, Normalize
 
+from ignite.contrib.handlers.neptune_logger import *
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.metrics import Accuracy, Loss
 from ignite.handlers import Checkpoint
-
-from ignite.contrib.handlers.neptune_logger import *
-
-LOG_INTERVAL = 10
+from ignite.utils import setup_logger
 
 
 class Net(nn.Module):
@@ -82,23 +78,14 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
     optimizer = SGD(model.parameters(), lr=lr, momentum=momentum)
     criterion = nn.CrossEntropyLoss()
     trainer = create_supervised_trainer(model, optimizer, criterion, device=device)
-
-    if sys.version_info > (3,):
-        from ignite.contrib.metrics.gpu_info import GpuInfo
-
-        try:
-            GpuInfo().attach(trainer)
-        except RuntimeError:
-            print(
-                "INFO: By default, in this example it is possible to log GPU information (used memory, utilization). "
-                "As there is no pynvml python package installed, GPU information won't be logged. Otherwise, please "
-                "install it : `pip install pynvml`"
-            )
+    trainer.logger = setup_logger("Trainer")
 
     metrics = {"accuracy": Accuracy(), "loss": Loss(criterion)}
 
     train_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    train_evaluator.logger = setup_logger("Train Evaluator")
     validation_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    validation_evaluator.logger = setup_logger("Val Evaluator")
 
     @trainer.on(Events.EPOCH_COMPLETED)
     def compute_metrics(engine):
@@ -118,29 +105,23 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
         },
     )
 
-    npt_logger.attach(
+    npt_logger.attach_output_handler(
         trainer,
-        log_handler=OutputHandler(
-            tag="training", output_transform=lambda loss: {"batchloss": loss}, metric_names="all"
-        ),
         event_name=Events.ITERATION_COMPLETED(every=100),
+        tag="training",
+        output_transform=lambda loss: {"batchloss": loss},
     )
 
-    npt_logger.attach(
-        train_evaluator,
-        log_handler=OutputHandler(tag="training", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    npt_logger.attach(
-        validation_evaluator,
-        log_handler=OutputHandler(tag="validation", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
+    for tag, evaluator in [("training", train_evaluator), ("validation", validation_evaluator)]:
+        npt_logger.attach_output_handler(
+            evaluator,
+            event_name=Events.EPOCH_COMPLETED,
+            tag=tag,
+            metric_names=["loss", "accuracy"],
+            global_step_transform=global_step_from_engine(trainer),
+        )
 
-    npt_logger.attach(
-        trainer, log_handler=OptimizerParamsHandler(optimizer), event_name=Events.ITERATION_COMPLETED(every=100)
-    )
+    npt_logger.attach_opt_params_handler(trainer, event_name=Events.ITERATION_COMPLETED(every=100), optimizer=optimizer)
 
     npt_logger.attach(
         trainer, log_handler=WeightsScalarHandler(model), event_name=Events.ITERATION_COMPLETED(every=100)
@@ -151,9 +132,8 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
     def score_function(engine):
         return engine.state.metrics["accuracy"]
 
-    to_save = {"model": model}
     handler = Checkpoint(
-        to_save,
+        {"model": model},
         NeptuneSaver(npt_logger),
         n_saved=2,
         filename_prefix="best",
@@ -165,6 +145,7 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
 
     # kick everything off
     trainer.run(train_loader, max_epochs=epochs)
+
     npt_logger.close()
 
 
@@ -180,12 +161,4 @@ if __name__ == "__main__":
 
     args = parser.parse_args()
 
-    # Setup engine logger
-    logger = logging.getLogger("ignite.engine.engine.Engine")
-    handler = logging.StreamHandler()
-    formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-    logger.setLevel(logging.INFO)
-
     run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum)
diff --git a/examples/contrib/mnist/mnist_with_tensorboard_logger.py b/examples/contrib/mnist/mnist_with_tensorboard_logger.py
index ad97ca16..276423a2 100644
--- a/examples/contrib/mnist/mnist_with_tensorboard_logger.py
+++ b/examples/contrib/mnist/mnist_with_tensorboard_logger.py
@@ -19,22 +19,20 @@
 """
 import sys
 from argparse import ArgumentParser
-import logging
 
 import torch
-from torch.utils.data import DataLoader
-from torch import nn
 import torch.nn.functional as F
+from torch import nn
 from torch.optim import SGD
+from torch.utils.data import DataLoader
 from torchvision.datasets import MNIST
 from torchvision.transforms import Compose, ToTensor, Normalize
 
+from ignite.contrib.handlers.tensorboard_logger import *
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.metrics import Accuracy, Loss
-from ignite.contrib.handlers.tensorboard_logger import *
-
-
-LOG_INTERVAL = 10
+from ignite.handlers import ModelCheckpoint
+from ignite.utils import setup_logger
 
 
 class Net(nn.Module):
@@ -81,6 +79,7 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
     optimizer = SGD(model.parameters(), lr=lr, momentum=momentum)
     criterion = nn.CrossEntropyLoss()
     trainer = create_supervised_trainer(model, optimizer, criterion, device=device)
+    trainer.logger = setup_logger("Trainer")
 
     if sys.version_info > (3,):
         from ignite.contrib.metrics.gpu_info import GpuInfo
@@ -97,7 +96,9 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
     metrics = {"accuracy": Accuracy(), "loss": Loss(criterion)}
 
     train_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    train_evaluator.logger = setup_logger("Train Evaluator")
     validation_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    validation_evaluator.logger = setup_logger("Val Evaluator")
 
     @trainer.on(Events.EPOCH_COMPLETED)
     def compute_metrics(engine):
@@ -106,29 +107,24 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
 
     tb_logger = TensorboardLogger(log_dir=log_dir)
 
-    tb_logger.attach(
+    tb_logger.attach_output_handler(
         trainer,
-        log_handler=OutputHandler(
-            tag="training", output_transform=lambda loss: {"batchloss": loss}, metric_names="all"
-        ),
         event_name=Events.ITERATION_COMPLETED(every=100),
+        tag="training",
+        output_transform=lambda loss: {"batchloss": loss},
+        metric_names="all",
     )
 
-    tb_logger.attach(
-        train_evaluator,
-        log_handler=OutputHandler(tag="training", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
+    for tag, evaluator in [("training", train_evaluator), ("validation", validation_evaluator)]:
+        tb_logger.attach_output_handler(
+            evaluator,
+            event_name=Events.EPOCH_COMPLETED,
+            tag=tag,
+            metric_names=["loss", "accuracy"],
+            global_step_transform=global_step_from_engine(trainer),
+        )
 
-    tb_logger.attach(
-        validation_evaluator,
-        log_handler=OutputHandler(tag="validation", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    tb_logger.attach(
-        trainer, log_handler=OptimizerParamsHandler(optimizer), event_name=Events.ITERATION_COMPLETED(every=100)
-    )
+    tb_logger.attach_opt_params_handler(trainer, event_name=Events.ITERATION_COMPLETED(every=100), optimizer=optimizer)
 
     tb_logger.attach(trainer, log_handler=WeightsScalarHandler(model), event_name=Events.ITERATION_COMPLETED(every=100))
 
@@ -138,8 +134,22 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
 
     tb_logger.attach(trainer, log_handler=GradsHistHandler(model), event_name=Events.EPOCH_COMPLETED(every=100))
 
+    def score_function(engine):
+        return engine.state.metrics["accuracy"]
+
+    model_checkpoint = ModelCheckpoint(
+        log_dir,
+        n_saved=2,
+        filename_prefix="best",
+        score_function=score_function,
+        score_name="validation_accuracy",
+        global_step_transform=global_step_from_engine(trainer),
+    )
+    validation_evaluator.add_event_handler(Events.COMPLETED, model_checkpoint, {"model": model})
+
     # kick everything off
     trainer.run(train_loader, max_epochs=epochs)
+
     tb_logger.close()
 
 
@@ -158,12 +168,4 @@ if __name__ == "__main__":
 
     args = parser.parse_args()
 
-    # Setup engine logger
-    logger = logging.getLogger("ignite.engine.engine.Engine")
-    handler = logging.StreamHandler()
-    formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-    logger.setLevel(logging.INFO)
-
     run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum, args.log_dir)
diff --git a/examples/contrib/mnist/mnist_with_tqdm_logger.py b/examples/contrib/mnist/mnist_with_tqdm_logger.py
index f6933857..73351b9e 100644
--- a/examples/contrib/mnist/mnist_with_tqdm_logger.py
+++ b/examples/contrib/mnist/mnist_with_tqdm_logger.py
@@ -8,11 +8,10 @@ import torch.nn.functional as F
 from torchvision.transforms import Compose, ToTensor, Normalize
 from torchvision.datasets import MNIST
 
+from ignite.contrib.handlers import ProgressBar
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.metrics import Accuracy, Loss, RunningAverage
 
-from ignite.contrib.handlers import ProgressBar
-
 
 class Net(nn.Module):
     def __init__(self):
diff --git a/examples/contrib/mnist/mnist_with_trains_logger.py b/examples/contrib/mnist/mnist_with_trains_logger.py
index e6f36a6e..5d59d95a 100644
--- a/examples/contrib/mnist/mnist_with_trains_logger.py
+++ b/examples/contrib/mnist/mnist_with_trains_logger.py
@@ -11,8 +11,6 @@
     python mnist_with_trains_logger.py
     ```
 """
-import logging
-import sys
 from argparse import ArgumentParser
 
 import torch
@@ -27,8 +25,7 @@ from ignite.contrib.handlers.trains_logger import *
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.handlers import Checkpoint
 from ignite.metrics import Accuracy, Loss
-
-LOG_INTERVAL = 10
+from ignite.utils import setup_logger
 
 
 class Net(nn.Module):
@@ -75,11 +72,14 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
     optimizer = SGD(model.parameters(), lr=lr, momentum=momentum)
     criterion = nn.CrossEntropyLoss()
     trainer = create_supervised_trainer(model, optimizer, criterion, device=device)
+    trainer.logger = setup_logger("Trainer")
 
     metrics = {"accuracy": Accuracy(), "loss": Loss(criterion)}
 
     train_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    train_evaluator.logger = setup_logger("Train Evaluator")
     validation_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    validation_evaluator.logger = setup_logger("Val Evaluator")
 
     @trainer.on(Events.EPOCH_COMPLETED)
     def compute_metrics(engine):
@@ -88,28 +88,24 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
 
     trains_logger = TrainsLogger(project_name="examples", task_name="ignite")
 
-    trains_logger.attach(
+    trains_logger.attach_output_handler(
         trainer,
-        log_handler=OutputHandler(
-            tag="training", output_transform=lambda loss: {"batchloss": loss}, metric_names="all"
-        ),
         event_name=Events.ITERATION_COMPLETED(every=100),
+        tag="training",
+        output_transform=lambda loss: {"batchloss": loss},
     )
 
-    trains_logger.attach(
-        train_evaluator,
-        log_handler=OutputHandler(tag="training", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    trains_logger.attach(
-        validation_evaluator,
-        log_handler=OutputHandler(tag="validation", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    trains_logger.attach(
-        trainer, log_handler=OptimizerParamsHandler(optimizer), event_name=Events.ITERATION_COMPLETED(every=100)
+    for tag, evaluator in [("training metrics", train_evaluator), ("validation metrics", validation_evaluator)]:
+        trains_logger.attach_output_handler(
+            evaluator,
+            event_name=Events.EPOCH_COMPLETED,
+            tag=tag,
+            metric_names=["loss", "accuracy"],
+            global_step_transform=global_step_from_engine(trainer),
+        )
+
+    trains_logger.attach_opt_params_handler(
+        trainer, event_name=Events.ITERATION_COMPLETED(every=100), optimizer=optimizer
     )
 
     trains_logger.attach(
@@ -128,17 +124,18 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
         {"model": model},
         TrainsSaver(trains_logger, dirname="~/.trains/cache/"),
         n_saved=1,
-        score_function=lambda e: 123,
-        score_name="acc",
+        score_function=lambda e: e.state.metrics["accuracy"],
+        score_name="val_acc",
         filename_prefix="best",
         global_step_transform=global_step_from_engine(trainer),
     )
-
     validation_evaluator.add_event_handler(Events.EPOCH_COMPLETED, handler)
 
     # kick everything off
     trainer.run(train_loader, max_epochs=epochs)
 
+    trains_logger.close()
+
 
 if __name__ == "__main__":
     parser = ArgumentParser()
@@ -152,12 +149,4 @@ if __name__ == "__main__":
 
     args = parser.parse_args()
 
-    # Setup engine logger
-    logger = logging.getLogger("ignite.engine.engine.Engine")
-    handler = logging.StreamHandler()
-    formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-    logger.setLevel(logging.INFO)
-
     run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum)
diff --git a/examples/contrib/mnist/mnist_with_visdom_logger.py b/examples/contrib/mnist/mnist_with_visdom_logger.py
index b9899128..697b2131 100644
--- a/examples/contrib/mnist/mnist_with_visdom_logger.py
+++ b/examples/contrib/mnist/mnist_with_visdom_logger.py
@@ -9,7 +9,7 @@
 
     Start visdom server:
     ```bash
-    visdom
+    visdom -logging_level 30
     ```
 
     Run the example:
@@ -18,7 +18,6 @@
     ```
 """
 from argparse import ArgumentParser
-import logging
 
 import torch
 from torch.utils.data import DataLoader
@@ -28,9 +27,11 @@ from torch.optim import SGD
 from torchvision.datasets import MNIST
 from torchvision.transforms import Compose, ToTensor, Normalize
 
+from ignite.contrib.handlers.visdom_logger import *
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.metrics import Accuracy, Loss
-from ignite.contrib.handlers.visdom_logger import *
+from ignite.handlers import ModelCheckpoint
+from ignite.utils import setup_logger
 
 
 class Net(nn.Module):
@@ -77,11 +78,14 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
     optimizer = SGD(model.parameters(), lr=lr, momentum=momentum)
     criterion = nn.CrossEntropyLoss()
     trainer = create_supervised_trainer(model, optimizer, criterion, device=device)
+    trainer.logger = setup_logger("Trainer")
 
     metrics = {"accuracy": Accuracy(), "loss": Loss(criterion)}
 
     train_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    train_evaluator.logger = setup_logger("Train Evaluator")
     validation_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    validation_evaluator.logger = setup_logger("Val Evaluator")
 
     @trainer.on(Events.EPOCH_COMPLETED)
     def compute_metrics(engine):
@@ -90,35 +94,46 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum, log_dir):
 
     vd_logger = VisdomLogger(env="mnist_training")
 
-    vd_logger.attach(
+    vd_logger.attach_output_handler(
         trainer,
-        log_handler=OutputHandler(tag="training", output_transform=lambda loss: {"batchloss": loss}),
         event_name=Events.ITERATION_COMPLETED(every=100),
+        tag="training",
+        output_transform=lambda loss: {"batchloss": loss},
     )
 
-    vd_logger.attach(
-        train_evaluator,
-        log_handler=OutputHandler(tag="training", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    vd_logger.attach(
-        validation_evaluator,
-        log_handler=OutputHandler(tag="validation", metric_names=["loss", "accuracy"], another_engine=trainer),
-        event_name=Events.EPOCH_COMPLETED,
-    )
+    for tag, evaluator in [("training", train_evaluator), ("validation", validation_evaluator)]:
+        vd_logger.attach_output_handler(
+            evaluator,
+            event_name=Events.EPOCH_COMPLETED,
+            tag=tag,
+            metric_names=["loss", "accuracy"],
+            global_step_transform=global_step_from_engine(trainer),
+        )
 
-    vd_logger.attach(
-        trainer, log_handler=OptimizerParamsHandler(optimizer), event_name=Events.ITERATION_COMPLETED(every=100)
-    )
+    vd_logger.attach_opt_params_handler(trainer, event_name=Events.ITERATION_COMPLETED(every=100), optimizer=optimizer)
 
     vd_logger.attach(trainer, log_handler=WeightsScalarHandler(model), event_name=Events.ITERATION_COMPLETED(every=100))
 
     vd_logger.attach(trainer, log_handler=GradsScalarHandler(model), event_name=Events.ITERATION_COMPLETED(every=100))
 
+    def score_function(engine):
+        return engine.state.metrics["accuracy"]
+
+    model_checkpoint = ModelCheckpoint(
+        log_dir,
+        n_saved=2,
+        filename_prefix="best",
+        score_function=score_function,
+        score_name="validation_accuracy",
+        global_step_transform=global_step_from_engine(trainer),
+    )
+    validation_evaluator.add_event_handler(Events.COMPLETED, model_checkpoint, {"model": model})
+
     # kick everything off
     trainer.run(train_loader, max_epochs=epochs)
 
+    vd_logger.close()
+
 
 if __name__ == "__main__":
     parser = ArgumentParser()
@@ -129,16 +144,8 @@ if __name__ == "__main__":
     parser.add_argument("--epochs", type=int, default=10, help="number of epochs to train (default: 10)")
     parser.add_argument("--lr", type=float, default=0.01, help="learning rate (default: 0.01)")
     parser.add_argument("--momentum", type=float, default=0.5, help="SGD momentum (default: 0.5)")
-    parser.add_argument("--log_dir", type=str, default="visdom_logs", help="log directory for Tensorboard log output")
+    parser.add_argument("--log_dir", type=str, default="mnist_visdom_logs", help="log directory for training output")
 
     args = parser.parse_args()
 
-    # Setup engine logger
-    logger = logging.getLogger("ignite.engine.engine.Engine")
-    handler = logging.StreamHandler()
-    formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-    logger.setLevel(logging.INFO)
-
     run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum, args.log_dir)
diff --git a/examples/contrib/mnist/mnist_with_wandb_logger.py b/examples/contrib/mnist/mnist_with_wandb_logger.py
index 8827b1cb..0501fa2a 100644
--- a/examples/contrib/mnist/mnist_with_wandb_logger.py
+++ b/examples/contrib/mnist/mnist_with_wandb_logger.py
@@ -15,23 +15,21 @@
 
     Go to https://wandb.com and explore your experiment.
 """
-import sys
 from argparse import ArgumentParser
-import logging
 
 import torch
-from torch.utils.data import DataLoader
-from torch import nn
 import torch.nn.functional as F
+from torch import nn
 from torch.optim import SGD
+from torch.utils.data import DataLoader
 from torchvision.datasets import MNIST
 from torchvision.transforms import Compose, ToTensor, Normalize
 
+from ignite.contrib.handlers.wandb_logger import *
 from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
 from ignite.metrics import Accuracy, Loss
 from ignite.handlers import ModelCheckpoint
-
-from ignite.contrib.handlers.wandb_logger import *
+from ignite.utils import setup_logger
 
 
 class Net(nn.Module):
@@ -74,14 +72,18 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
     if torch.cuda.is_available():
         device = "cuda"
 
+    model.to(device)  # Move model before creating optimizer
     optimizer = SGD(model.parameters(), lr=lr, momentum=momentum)
     criterion = nn.CrossEntropyLoss()
     trainer = create_supervised_trainer(model, optimizer, criterion, device=device)
+    trainer.logger = setup_logger("Trainer")
 
     metrics = {"accuracy": Accuracy(), "loss": Loss(criterion)}
 
     train_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    train_evaluator.logger = setup_logger("Train Evaluator")
     validation_evaluator = create_supervised_evaluator(model, metrics=metrics, device=device)
+    validation_evaluator.logger = setup_logger("Val Evaluator")
 
     @trainer.on(Events.EPOCH_COMPLETED)
     def compute_metrics(engine):
@@ -100,37 +102,24 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
         },
     )
 
-    wandb_logger.attach(
+    wandb_logger.attach_output_handler(
         trainer,
-        log_handler=OutputHandler(
-            tag="training",
-            output_transform=lambda loss: {"batchloss": loss},
-            metric_names="all",
-            global_step_transform=lambda *_: trainer.state.iteration,
-        ),
         event_name=Events.ITERATION_COMPLETED(every=100),
+        tag="training",
+        output_transform=lambda loss: {"batchloss": loss},
     )
 
-    wandb_logger.attach(
-        train_evaluator,
-        log_handler=OutputHandler(
-            tag="training", metric_names=["loss", "accuracy"], global_step_transform=lambda *_: trainer.state.iteration
-        ),
-        event_name=Events.EPOCH_COMPLETED,
-    )
-
-    wandb_logger.attach(
-        validation_evaluator,
-        log_handler=OutputHandler(
-            tag="validation",
+    for tag, evaluator in [("training", train_evaluator), ("validation", validation_evaluator)]:
+        wandb_logger.attach_output_handler(
+            evaluator,
+            event_name=Events.EPOCH_COMPLETED,
+            tag=tag,
             metric_names=["loss", "accuracy"],
             global_step_transform=lambda *_: trainer.state.iteration,
-        ),
-        event_name=Events.EPOCH_COMPLETED,
-    )
+        )
 
-    wandb_logger.attach(
-        trainer, log_handler=OptimizerParamsHandler(optimizer), event_name=Events.ITERATION_COMPLETED(every=100)
+    wandb_logger.attach_opt_params_handler(
+        trainer, event_name=Events.ITERATION_COMPLETED(every=100), optimizer=optimizer
     )
     wandb_logger.watch(model, log="all")
 
@@ -143,12 +132,13 @@ def run(train_batch_size, val_batch_size, epochs, lr, momentum):
         filename_prefix="best",
         score_function=score_function,
         score_name="validation_accuracy",
-        global_step_transform=lambda *_: trainer.state.iteration,
+        global_step_transform=global_step_from_engine(trainer),
     )
     validation_evaluator.add_event_handler(Events.COMPLETED, model_checkpoint, {"model": model})
 
     # kick everything off
     trainer.run(train_loader, max_epochs=epochs)
+
     wandb_logger.close()
 
 
@@ -164,12 +154,4 @@ if __name__ == "__main__":
 
     args = parser.parse_args()
 
-    # Setup engine logger
-    logger = logging.getLogger("ignite.engine.engine.Engine")
-    handler = logging.StreamHandler()
-    formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-    logger.setLevel(logging.INFO)
-
     run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum)
diff --git a/ignite/contrib/engines/common.py b/ignite/contrib/engines/common.py
index df0f0eee..d073d7ce 100644
--- a/ignite/contrib/engines/common.py
+++ b/ignite/contrib/engines/common.py
@@ -247,8 +247,9 @@ def _setup_logging(logger, trainer, optimizers, evaluators, log_every_iters):
         if isinstance(evaluators, Engine):
             evaluators = {"validation": evaluators}
 
+        event_name = Events.ITERATION_COMPLETED if isinstance(logger, WandBLogger) else None
+        gst = global_step_from_engine(trainer, custom_event_name=event_name)
         for k, evaluator in evaluators.items():
-            gst = global_step_from_engine(trainer)
             logger.attach_output_handler(
                 evaluator, event_name=Events.COMPLETED, tag=k, metric_names="all", global_step_transform=gst
             )
diff --git a/ignite/contrib/handlers/wandb_logger.py b/ignite/contrib/handlers/wandb_logger.py
index e251ecd8..a9850066 100644
--- a/ignite/contrib/handlers/wandb_logger.py
+++ b/ignite/contrib/handlers/wandb_logger.py
@@ -29,14 +29,14 @@ class OutputHandler(BaseOutputHandler):
             )
 
             # Attach the logger to the evaluator on the validation dataset and log NLL, Accuracy metrics after
-            # each epoch. We setup `global_step_transform=global_step_from_engine(trainer)` to take the epoch
+            # each epoch. We setup `global_step_transform=lambda *_: trainer.state.iteration,` to take iteration value
             # of the `trainer`:
             wandb_logger.attach(
                 evaluator,
                 log_handler=OutputHandler(
                     tag="validation",
                     metric_names=["nll", "accuracy"],
-                    global_step_transform=global_step_from_engine(trainer)
+                    global_step_transform=lambda *_: trainer.state.iteration,
                 ),
                 event_name=Events.EPOCH_COMPLETED
             )
@@ -46,7 +46,7 @@ class OutputHandler(BaseOutputHandler):
                 event_name=Events.EPOCH_COMPLETED,
                 tag="validation",
                 metric_names=["nll", "accuracy"],
-                global_step_transform=global_step_from_engine(trainer)
+                global_step_transform=lambda *_: trainer.state.iteration,
             )
 
         Another example, where model is evaluated every 500 iterations:
@@ -236,25 +236,25 @@ class WandBLogger(BaseLogger):
             )
 
             # Attach the logger to the evaluator on the training dataset and log NLL, Accuracy metrics after each epoch
-            # We setup `global_step_transform=global_step_from_engine(trainer)` to take the epoch
-            # of the `trainer` instead of `train_evaluator`.
+            # We setup `global_step_transform=lambda *_: trainer.state.iteration` to take iteration value
+            # of the `trainer`:
             wandb_logger.attach_output_handler(
                 train_evaluator,
                 event_name=Events.EPOCH_COMPLETED,
                 tag="training",
                 metric_names=["nll", "accuracy"],
-                global_step_transform=global_step_from_engine(trainer),
+                global_step_transform=lambda *_: trainer.state.iteration,
             )
 
             # Attach the logger to the evaluator on the validation dataset and log NLL, Accuracy metrics after
-            # each epoch. We setup `global_step_transform=global_step_from_engine(trainer)` to take the epoch of the
-            # `trainer` instead of `evaluator`.
+            # each epoch. We setup `global_step_transform=lambda *_: trainer.state.iteration` to take iteration value
+            # of the `trainer` instead of `evaluator`.
             wandb_logger.attach_output_handler(
                 evaluator,
                 event_name=Events.EPOCH_COMPLETED,
                 tag="validation",
                 metric_names=["nll", "accuracy"],
-                global_step_transform=global_step_from_engine(trainer)),
+                global_step_transform=lambda *_: trainer.state.iteration,
             )
 
             # Attach the logger to the trainer to log optimizer's parameters, e.g. learning rate at each iteration
@@ -296,9 +296,9 @@ class WandBLogger(BaseLogger):
                 wandb_logger.run.dir, n_saved=2, filename_prefix='best',
                 require_empty=False, score_function=score_function,
                 score_name="validation_accuracy",
-                global_step_transform=global_step_from_engine(trainer))
-            evaluator.add_event_handler(
-                Events.COMPLETED, model_checkpoint, {'model': model})
+                global_step_transform=global_step_from_engine(trainer)
+            )
+            evaluator.add_event_handler(Events.COMPLETED, model_checkpoint, {'model': model})
     """
 
     def __init__(self, *args, **kwargs):
diff --git a/ignite/handlers/__init__.py b/ignite/handlers/__init__.py
index 9100d630..9278d48d 100644
--- a/ignite/handlers/__init__.py
+++ b/ignite/handlers/__init__.py
@@ -18,18 +18,21 @@ __all__ = [
 ]
 
 
-def global_step_from_engine(engine: Engine) -> Callable:
+def global_step_from_engine(engine: Engine, custom_event_name=None) -> Callable:
     """Helper method to setup `global_step_transform` function using another engine.
     This can be helpful for logging trainer epoch/iteration while output handler is attached to an evaluator.
 
     Args:
         engine (Engine): engine which state is used to provide the global step
+        custom_event_name (optional): registered event name. Optional argument, event name to use.
 
     Returns:
         global step
     """
 
     def wrapper(_: Any, event_name: Union[EventEnum, CallableEventWithFilter]):
+        if custom_event_name is not None:
+            event_name = custom_event_name
         return engine.state.get_event_attrib_value(event_name)
 
     return wrapper

wandb: WARNING Adding to old History rows isn't currently supported.
## 🐛 Bug description

<!-- A clear and concise description of what the bug is. -->

When `setup_wandb_logging` is used, no metric is logged into `wandb`.

<!-- Please, add steps on how to reproduce it. -->

Replace all `wandb` setup codes in the [example](https://github.com/pytorch/ignite/blob/master/examples/contrib/mnist/mnist_with_wandb_logger.py) with 

```
    setup_wandb_logging(
        trainer,
        optimizers=optimizer,
        evaluators={"train_evaluator": train_evaluator, "val_evaluator": validation_evaluator},
    )
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
<!-- A clear and concise description of what you expected to happen. -->

Sample output:

```
2020-05-31 15:33:48,794 ignite.engine.engine.Engine INFO     Engine run starting with max_epochs=10.
2020-05-31 15:34:15,116 ignite.engine.engine.Engine INFO     Epoch[1] Complete. Time taken: 00:00:26
2020-05-31 15:34:15,116 ignite.engine.engine.Engine INFO     Engine run starting with max_epochs=1.
2020-05-31 15:34:28,936 ignite.engine.engine.Engine INFO     Epoch[1] Complete. Time taken: 00:00:14
wandb: WARNING Adding to old History rows isn't currently supported.  Step 1 < 900; dropping {'train_evaluator/accuracy': 0.93575, 'train_evaluator/loss': 0.21386248969634375}.
2020-05-31 15:34:28,937 ignite.engine.engine.Engine INFO     Engine run complete. Time taken 00:00:14
2020-05-31 15:34:28,937 ignite.engine.engine.Engine INFO     Engine run starting with max_epochs=1.
2020-05-31 15:34:31,217 ignite.engine.engine.Engine INFO     Epoch[1] Complete. Time taken: 00:00:02
wandb: WARNING Adding to old History rows isn't currently supported.  Step 1 < 900; dropping {'val_evaluator/accuracy': 0.9388, 'val_evaluator/loss': 0.19922671020030974}.
2020-05-31 15:34:31,218 ignite.engine.engine.Engine INFO     Engine run complete. Time taken 00:00:02
2020-05-31 15:35:00,453 ignite.engine.engine.Engine INFO     Epoch[2] Complete. Time taken: 00:00:29
2020-05-31 15:35:00,454 ignite.engine.engine.Engine INFO     Engine run starting with max_epochs=1.
2020-05-31 15:35:14,638 ignite.engine.engine.Engine INFO     Epoch[1] Complete. Time taken: 00:00:14
wandb: WARNING Adding to old History rows isn't currently supported.  Step 2 < 1800; dropping {'train_evaluator/accuracy': 0.95845, 'train_evaluator/loss': 0.13595107924938202}.
2020-05-31 15:35:14,639 ignite.engine.engine.Engine INFO     Engine run complete. Time taken 00:00:14
2020-05-31 15:35:14,639 ignite.engine.engine.Engine INFO     Engine run starting with max_epochs=1.
2020-05-31 15:35:16,887 ignite.engine.engine.Engine INFO     Epoch[1] Complete. Time taken: 00:00:02
wandb: WARNING Adding to old History rows isn't currently supported.  Step 2 < 1800; dropping {'val_evaluator/accuracy': 0.9615, 'val_evaluator/loss': 0.12946590296924115}.
```

When login to [wandb](https://app.wandb.ai/), no metric is logged. 


## Environment

 - PyTorch Version (e.g., 1.4): 1.5.0
 - Ignite Version (e.g., 0.3.0):`cfd0799`
 - OS (e.g., Linux): macOS 10.15.5
 - How you installed Ignite (`conda`, `pip`, source): source
 - Python version: 3.8.2
diff --git a/tests/ignite/contrib/handlers/test_base_logger.py b/tests/ignite/contrib/handlers/test_base_logger.py
index 0a3a9e89..82493524 100644
--- a/tests/ignite/contrib/handlers/test_base_logger.py
+++ b/tests/ignite/contrib/handlers/test_base_logger.py
@@ -4,7 +4,7 @@ from unittest.mock import MagicMock
 import pytest
 import torch
 
-from ignite.contrib.handlers import CustomPeriodicEvent, global_step_from_engine
+from ignite.contrib.handlers import CustomPeriodicEvent
 from ignite.contrib.handlers.base_logger import BaseLogger, BaseOptimizerParamsHandler, BaseOutputHandler
 from ignite.engine import Engine, Events, State
 
diff --git a/tests/ignite/handlers/test_handlers.py b/tests/ignite/handlers/test_handlers.py
new file mode 100644
index 00000000..f10b28e9
--- /dev/null
+++ b/tests/ignite/handlers/test_handlers.py
@@ -0,0 +1,20 @@
+from unittest.mock import MagicMock
+
+from ignite.engine import Engine, Events
+from ignite.handlers import global_step_from_engine
+
+
+def test_global_step_from_engine():
+
+    iteration = 12
+    epoch = 23
+
+    trainer = Engine(lambda e, b: None)
+    trainer.state.iteration = iteration
+    trainer.state.epoch = epoch
+
+    gst = global_step_from_engine(trainer)
+    assert gst(MagicMock(), Events.EPOCH_COMPLETED) == epoch
+
+    gst = global_step_from_engine(trainer, custom_event_name=Events.ITERATION_COMPLETED)
+    assert gst(MagicMock(), Events.EPOCH_COMPLETED) == iteration

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc pip install torch torchvision -f https://download.pytorch.org/whl/cpu/torch_stable.html -U
3.7
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
absl-py==2.1.0
alembic==1.12.1
arrow==1.2.3
attrs==24.2.0
boto3==1.33.13
botocore==1.33.13
bravado==11.1.0
bravado-core==6.1.1
cached-property==1.5.2
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
click==7.1.2
cloudpickle==2.2.1
codecov==2.1.13
coverage==7.2.7
cycler==0.11.0
databricks-cli==0.18.0
dill==0.3.7
docker==6.1.3
entrypoints==0.4
exceptiongroup==1.2.2
execnet==2.0.2
Flask==1.1.4
fonttools==4.38.0
fqdn==1.5.1
funcsigs==1.0.2
furl==2.1.4
future==1.0.0
gitdb==4.0.12
GitPython==3.1.44
google-auth==2.38.0
google-auth-oauthlib==0.4.6
greenlet==3.1.1
grpcio==1.62.3
gunicorn==20.1.0
gym==0.26.2
gym-notices==0.0.8
hestia==0.6.0
humanfriendly==10.0
idna==3.10
importlib-metadata==5.2.0
importlib-resources==5.12.0
iniconfig==2.0.0
isoduration==20.11.0
itsdangerous==1.1.0
Jinja2==2.10.3
jmespath==1.0.1
joblib==1.3.2
jsonpatch==1.33
jsonpointer==3.0.0
jsonref==1.1.0
jsonschema==4.17.3
kiwisolver==1.4.5
Mako==1.2.4
Markdown==3.4.4
MarkupSafe==2.1.5
marshmallow==3.0.0rc5
matplotlib==3.5.3
mlflow==1.30.1
monotonic==1.6
msgpack==1.0.5
neptune-client==1.11.1
networkx==2.6.3
numpy==1.21.6
oauthlib==3.2.2
orderedmultidict==1.0.1
packaging==21.3
pandas==1.3.5
pathlib2==2.3.7.post1
Pillow==9.5.0
pkgutil_resolve_name==1.3.10
pluggy==1.2.0
polyaxon-client==0.6.1
polyaxon-schemas==0.6.1
polystores==0.2.5
prometheus-client==0.17.1
prometheus_flask_exporter==0.23.2
protobuf==3.20.3
psutil==7.0.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
PyJWT==2.8.0
pynvml==11.5.3
pyparsing==3.1.4
pyrsistent==0.19.3
pytest==7.4.4
pytest-cov==4.1.0
pytest-xdist==3.5.0
python-dateutil==2.9.0.post0
-e git+https://github.com/pytorch/ignite.git@cfd07999b891016b7a365139cb9995f7770e2e4d#egg=pytorch_ignite
pytz==2022.7.1
PyYAML==6.0.1
querystring-parser==1.2.4
requests==2.31.0
requests-file==2.1.0
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rhea==0.5.5
rsa==4.9
s3transfer==0.8.2
scikit-learn==1.0.2
scipy==1.7.3
simplejson==3.20.1
six==1.17.0
smmap==5.0.2
SQLAlchemy==1.4.54
sqlparse==0.4.4
swagger-spec-validator==3.0.3
tabulate==0.9.0
tensorboard==2.11.2
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorboardX==2.6.2.2
threadpoolctl==3.1.0
tomli==2.0.1
torch==1.13.1+cpu
torchvision==0.14.1+cpu
tornado==6.2
tqdm==4.67.1
trains==0.16.4
typing_extensions==4.7.1
uri-template==1.3.0
urllib3==1.26.20
visdom==0.2.4
webcolors==1.13
websocket-client==1.6.1
Werkzeug==1.0.1
zipp==3.15.0

name: ignite
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - absl-py==2.1.0
      - alembic==1.12.1
      - arrow==1.2.3
      - attrs==24.2.0
      - boto3==1.33.13
      - botocore==1.33.13
      - bravado==11.1.0
      - bravado-core==6.1.1
      - cached-property==1.5.2
      - cachetools==5.5.2
      - charset-normalizer==3.4.1
      - click==7.1.2
      - cloudpickle==2.2.1
      - codecov==2.1.13
      - coverage==7.2.7
      - cycler==0.11.0
      - databricks-cli==0.18.0
      - dill==0.3.7
      - docker==6.1.3
      - entrypoints==0.4
      - exceptiongroup==1.2.2
      - execnet==2.0.2
      - flask==1.1.4
      - fonttools==4.38.0
      - fqdn==1.5.1
      - funcsigs==1.0.2
      - furl==2.1.4
      - future==1.0.0
      - gitdb==4.0.12
      - gitpython==3.1.44
      - google-auth==2.38.0
      - google-auth-oauthlib==0.4.6
      - greenlet==3.1.1
      - grpcio==1.62.3
      - gunicorn==20.1.0
      - gym==0.26.2
      - gym-notices==0.0.8
      - hestia==0.6.0
      - humanfriendly==10.0
      - idna==3.10
      - importlib-metadata==5.2.0
      - importlib-resources==5.12.0
      - iniconfig==2.0.0
      - isoduration==20.11.0
      - itsdangerous==1.1.0
      - jinja2==2.10.3
      - jmespath==1.0.1
      - joblib==1.3.2
      - jsonpatch==1.33
      - jsonpointer==3.0.0
      - jsonref==1.1.0
      - jsonschema==4.17.3
      - kiwisolver==1.4.5
      - mako==1.2.4
      - markdown==3.4.4
      - markupsafe==2.1.5
      - marshmallow==3.0.0rc5
      - matplotlib==3.5.3
      - mlflow==1.30.1
      - monotonic==1.6
      - msgpack==1.0.5
      - neptune-client==1.11.1
      - networkx==2.6.3
      - numpy==1.21.6
      - oauthlib==3.2.2
      - orderedmultidict==1.0.1
      - packaging==21.3
      - pandas==1.3.5
      - pathlib2==2.3.7.post1
      - pillow==9.5.0
      - pkgutil-resolve-name==1.3.10
      - pluggy==1.2.0
      - polyaxon-client==0.6.1
      - polyaxon-schemas==0.6.1
      - polystores==0.2.5
      - prometheus-client==0.17.1
      - prometheus-flask-exporter==0.23.2
      - protobuf==3.20.3
      - psutil==7.0.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pyjwt==2.8.0
      - pynvml==11.5.3
      - pyparsing==3.1.4
      - pyrsistent==0.19.3
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pytest-xdist==3.5.0
      - python-dateutil==2.9.0.post0
      - pytorch-ignite==0.4.0
      - pytz==2022.7.1
      - pyyaml==6.0.1
      - querystring-parser==1.2.4
      - requests==2.31.0
      - requests-file==2.1.0
      - requests-oauthlib==2.0.0
      - requests-toolbelt==1.0.0
      - rfc3339-validator==0.1.4
      - rfc3986-validator==0.1.1
      - rhea==0.5.5
      - rsa==4.9
      - s3transfer==0.8.2
      - scikit-learn==1.0.2
      - scipy==1.7.3
      - simplejson==3.20.1
      - six==1.17.0
      - smmap==5.0.2
      - sqlalchemy==1.4.54
      - sqlparse==0.4.4
      - swagger-spec-validator==3.0.3
      - tabulate==0.9.0
      - tensorboard==2.11.2
      - tensorboard-data-server==0.6.1
      - tensorboard-plugin-wit==1.8.1
      - tensorboardx==2.6.2.2
      - threadpoolctl==3.1.0
      - tomli==2.0.1
      - torch==1.13.1+cpu
      - torchvision==0.14.1+cpu
      - tornado==6.2
      - tqdm==4.67.1
      - trains==0.16.4
      - typing-extensions==4.7.1
      - uri-template==1.3.0
      - urllib3==1.26.20
      - visdom==0.2.4
      - webcolors==1.13
      - websocket-client==1.6.1
      - werkzeug==1.0.1
      - zipp==3.15.0
prefix: /opt/conda/envs/ignite

tests/ignite/handlers/test_handlers.py::test_global_step_from_engine
tests/ignite/contrib/handlers/test_base_logger.py::test_base_output_handler_wrong_setup tests/ignite/contrib/handlers/test_base_logger.py::test_base_output_handler_setup_output_metrics tests/ignite/contrib/handlers/test_base_logger.py::test_attach tests/ignite/contrib/handlers/test_base_logger.py::test_attach_on_custom_event tests/ignite/contrib/handlers/test_base_logger.py::test_as_context_manager
examples/contrib/mnist/mnist_with_neptune_logger.py examples/contrib/mnist/mnist_with_trains_logger.py ignite/contrib/engines/common.py examples/contrib/mnist/mnist_with_tqdm_logger.py ignite/handlers/__init__.py examples/contrib/mnist/mnist_with_tensorboard_logger.py ignite/contrib/handlers/wandb_logger.py examples/contrib/mnist/mnist_with_visdom_logger.py examples/contrib/mnist/mnist_with_wandb_logger.py
examples/contrib/mnist/mnist_with_neptune_logger.py examples/contrib/mnist/mnist_with_trains_logger.py ignite/contrib/engines/common.py examples/contrib/mnist/mnist_with_tqdm_logger.py ignite/handlers/__init__.py examples/contrib/mnist/mnist_with_tensorboard_logger.py ignite/contrib/handlers/wandb_logger.py examples/contrib/mnist/mnist_with_visdom_logger.py examples/contrib/mnist/mnist_with_wandb_logger.py