# SetLogRetention

### void SetLogRetention(short nDays)

EZGemPlus에 Log 보관일수를 설정하는 함수. 이 함수는 로그 파일을 며칠 동안 유지할지 결정합니다. 설정된 기간보다 오래된 로그 파일은 `SetLogDelTime`에서 지정한 시각에 자동으로 삭제됩니다.

Parameters

<table data-header-hidden><thead><tr><th width="202" valign="top"></th><th width="118" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">nDays</td><td valign="top">short</td><td valign="top">설정(변경)하고자 하는 값 (Default Retention Days = 30)</td></tr></tbody></table>

```csharp
    // 1. 보관 일수 설정 (short 타입)
    // 예: 현장 요구사항에 따라 60일간 보관하도록 설정
    short nDays = 60;

    // 2. SetLogRetention 호출
    // 기본값(Default)은 30일입니다.
    m_gem.SetLogRetention(nDays);

    Console.WriteLine($"로그 보관 기간이 {nDays}일로 설정되었습니다.");
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/undefined-2/setlogretention.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
