---
title: Log
description: >-
  The MLflow logger in PyTorch Lightning now includes a checkpointpathprefix
  parameter. This parameter allows you to prefix the checkpoint artifact's path
  when logging checkpoints as artifacts.
canonical: 'https://lightning.ai/docs/pytorch/stable/reference/visualize/loggers'
---
# Log {#log}

- [Basic](/docs/pytorch/2.5.5/reference/visualize/logging_basic.md) — Learn how to track and visualize metrics, images and text.

- [Intermediate](/docs/pytorch/2.5.5/reference/visualize/logging_intermediate.md) — Enable third-party experiment managers with advanced visualizations.

- [Advanced](/docs/pytorch/2.5.5/reference/visualize/logging_advanced.md) — Optimize model speed with advanced self.log arguments and cloud logging.

- [Expert](/docs/pytorch/2.5.5/reference/visualize/logging_expert.md) — Make your own progress-bar or integrate a new experiment manager.

- [LightningModule.log API](/docs/pytorch/2.5.5/core-api/lightning_module.md#log) — Dig into the LightningModule.log API in depth

## MLflow Logger {#mlflow-logger}

The MLflow logger in PyTorch Lightning now includes a `checkpoint_path_prefix` parameter. This parameter allows you to prefix the checkpoint artifact's path when logging checkpoints as artifacts.

Example usage:

```python
import lightning as L
from lightning.pytorch.loggers import MLFlowLogger

mlf_logger = MLFlowLogger(
    experiment_name="lightning_logs",
    tracking_uri="file:./ml-runs",
    checkpoint_path_prefix="my_prefix"
)
trainer = L.Trainer(logger=mlf_logger)

# Your LightningModule definition
class LitModel(L.LightningModule):
    def training_step(self, batch, batch_idx):
        # example
        self.logger.experiment.whatever_ml_flow_supports(...)

    def any_lightning_module_function_or_hook(self):
        self.logger.experiment.whatever_ml_flow_supports(...)

# Train your model
model = LitModel()
trainer.fit(model)
```

---

**Navigation**

- Parent: [Visualize](/docs/pytorch/2.5.5/reference/visualize.md)
