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

# configurações de sessão log_*

> Configurações de sessão do ClickHouse no grupo gerado "log_*".

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Tipo</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Padrão</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Pode ser alterado sem reiniciar
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

Essas configurações estão disponíveis em [system.settings](/docs/pt-BR/reference/system-tables/settings) e são geradas automaticamente a partir do [código-fonte](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<div id="log_comment">
  ## log\_comment
</div>

Especifica o valor do campo `log_comment` da tabela [system.query\_log](/docs/pt-BR/reference/system-tables/query_log) e o texto de comentário do log do servidor.

Pode ser usado para melhorar a legibilidade dos logs do servidor. Além disso, ajuda a selecionar consultas relacionadas ao teste em `system.query_log` após executar [clickhouse-test](/docs/pt-BR/resources/develop-contribute/contribute/tests).

Valores possíveis:

* Qualquer string com comprimento não superior a [max\_query\_size](/docs/pt-BR/reference/settings/session-settings/max#max_query_size). Se `max&#95;query&#95;size` for excedido, o servidor lança uma exceção.

**Exemplo**

Consulta:

```sql theme={null}
SET log_comment = 'log_comment test', log_queries = 1;
SELECT 1;
SYSTEM FLUSH LOGS;
SELECT type, query FROM system.query_log WHERE log_comment = 'log_comment test' AND event_date >= yesterday() ORDER BY event_time DESC LIMIT 2;
```

Resultado:

```text theme={null}
┌─type────────┬─query─────┐
│ QueryStart  │ SELECT 1; │
│ QueryFinish │ SELECT 1; │
└─────────────┴───────────┘
```

<div id="log_formatted_queries">
  ## log\_formatted\_queries
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

Permite registrar consultas formatadas na system table [system.query\_log](/docs/pt-BR/reference/system-tables/query_log) (preenche a coluna `formatted_query` em [system.query\_log](/docs/pt-BR/reference/system-tables/query_log)).

Valores possíveis:

* 0 — As consultas formatadas não são registradas na system table.
* 1 — As consultas formatadas são registradas na system table.

<div id="log_processors_profiles">
  ## log\_processors\_profiles
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "Habilitado por padrão"}]}]} />

Registra na tabela `system.processors_profile_log` o tempo que o processador gastou durante a execução/espera por dados.

Veja também:

* [`system.processors_profile_log`](/docs/pt-BR/reference/system-tables/processors_profile_log)
* [`EXPLAIN PIPELINE`](/docs/pt-BR/reference/statements/explain#explain-pipeline)

<div id="log_profile_events">
  ## log\_profile\_events
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

Registra estatísticas de desempenho da consulta no query\_log, query\_thread\_log e query\_views\_log.
