def test_log_dir_multiple_loggers(tmp_path):
    """Tests that the logdir equals the default_root_dir when trainer has multiple loggers."""
    default_root_dir = tmp_path / "default_root_dir"
    save_dir = tmp_path / "save_dir"
    expected = str(tmp_path / "save_dir" / "custom_logs" / "version_0")
    model = TestModel(expected)
    trainer = Trainer(
        default_root_dir=default_root_dir,
        max_steps=2,
        logger=[TensorBoardLogger(save_dir=save_dir, name="custom_logs"), CSVLogger(tmp_path)],
    )

    assert trainer.log_dir == expected
    trainer.fit(model)
    assert trainer.log_dir == expected
Tests that the logdir equals the default_root_dir when trainer has multiple loggers.
tests/tests_pytorch/trainer/properties/test_log_dir.py