# Add Trace Flags and Log Levels

To generate debug logs in Web Console, you must add user-specific trace flags and log levels in the `traceLogs.json` file.

1. Hover over the **No Tracing** label on the task bar and select **Create trace flags for the current user** to add a trace flag for your user.
   ![Tracing options on the task bar](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/mouse_hover_trace_menu.png)

2. The `traceLogs.json` file opens with an added trace flag block for the current user. To change the log level for the current user, click the **Change** text before the `debugLevelName` property.
   ![Adding trace flags for the current user](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/user_log_level.png)

3. To add trace flags for another user, click the **Add trace for another user** text before the `USER_DEBUG` property and specify a username to add.

4. Add log levels.

   :::note
   For more information about log levels, refer to [Debug Log Levels](https://help.salesforce.com/s/articleView?id=platform.code_setting_debug_log_levels.htm\&type=5)
   :::

   1. Click the **Create Debug level** text.
   2. Type a label and press Enter.
   3. To accept the default log levels, select **Yes**. To customize log levels, select **No** and select an option for different log types.
      ![Log levels are added in the traceLogs.json file](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/debug_levels2.png)

5. To remove a block, click the **Remove** text before the block.
   Notice that the **No Tracing** label on the taskbar changes to **Tracing until END-TIME**.

   ![Tracing status showed on the taskbar](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/tracing_started.png)

After the tracing starts, whenever you perform a task on the connected org, a log is generated with trace details. Here's an example.
![Logs with trace details](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/logs_pulled.png)

Logs are pulled by default after every 30 seconds. You can change the log-pull interval in Settings.
![Log-pull interval in settings](https://a.sfdcstatic.com/developer-website/sfdocs/salesforcedx/media/webconsole/log_pull_time2.png)
