> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Emit traces to multiple projects simultaneously

export const plans_0 = "Any"

export const deployments_0 = "Any"

export const data_plane_version_0 = undefined

export const use_case_0 = undefined

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

## Summary

**Goal:** Emit traces to two separate projects with distinct root spans simultaneously.

**Features:** Multiple logger instances with independent project targets and `setCurrent: false` configuration.

## Configuration Steps

### Step 1: Create primary logger

Initialize the main logger for your primary project.

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// TypeScript
import { initLogger } from "braintrust";

const primaryLogger = initLogger({
  projectName: "my-primary-project",
  apiKey: process.env.BRAINTRUST_API_KEY,
});

# Python
from braintrust import init_logger

primary_logger = init_logger(
    project="my-primary-project",
    api_key=os.environ["BRAINTRUST_API_KEY"],
)

```

### Step 2: Create secondary logger with setCurrent: false

Initialize a second logger targeting the other project with `setCurrent: false` to prevent conflicts.

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// TypeScript
const secondaryLogger = initLogger({
  projectName: "shared-visibility-project",
  apiKey: process.env.BRAINTRUST_API_KEY,
  setCurrent: false, // Prevents this logger from becoming the global default
});

# Python
secondary_logger = init_logger(
    project="shared-visibility-project",
    api_key=os.environ["BRAINTRUST_API_KEY"],
    set_current=False,  # Prevents this logger from becoming the global default
)

```

### Step 3: Log to both projects

Use each logger instance to create distinct traces in their respective projects.

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// TypeScript
primaryLogger.log({ input: "request", output: "response" });
secondaryLogger.log({ input: "request", output: "response" });

# Python
primary_logger.log(input="request", output="response")
secondary_logger.log(input="request", output="response")

```

## Use Case Example

Emit traces to both a shared service project and the consuming application's project for dual visibility without post-processing.
