> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# log_* 세션 설정

> log_* 생성 그룹의 ClickHouse 세션 설정

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["버전", "기본값", "설명"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        버전 이력
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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
  }}>유형</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>기본값</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          재시작 없이 변경 가능
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

이 설정은 [system.settings](/ko/reference/system-tables/settings)에서 확인할 수 있으며, [소스](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp)를 기반으로 자동 생성됩니다.

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

[system.query\_log](/ko/reference/system-tables/query_log) 테이블의 `log_comment` field 값과 서버 로그의 comment 텍스트를 지정합니다.

서버 로그의 가독성을 높이는 데 사용할 수 있습니다. 또한 [clickhouse-test](/ko/resources/develop-contribute/contribute/tests)를 실행한 후 `system.query_log`에서 테스트와 관련된 쿼리를 선별하는 데도 도움이 됩니다.

가능한 값:

* [max\_query\_size](/ko/reference/settings/session-settings/max#max_query_size) 이하의 임의의 문자열입니다. max\_query\_size를 초과하면 서버가 예외를 발생시킵니다.

**예시**

쿼리:

```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;
```

결과:

```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" />

포맷된 쿼리를 [system.query\_log](/ko/reference/system-tables/query_log) 시스템 테이블에 기록하도록 합니다([system.query\_log](/ko/reference/system-tables/query_log)의 `formatted_query` 컬럼을 채웁니다).

가능한 값:

* 0 — 포맷된 쿼리는 시스템 테이블에 기록되지 않습니다.
* 1 — 포맷된 쿼리는 시스템 테이블에 기록됩니다.

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

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

processor가 실행 중이거나 데이터를 기다리는 동안 소요한 시간을 `system.processors_profile_log` 테이블에 기록합니다.

관련 항목:

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

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

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

쿼리 성능 통계를 query\_log, query\_thread\_log 및 query\_views\_log에 기록합니다.
