---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# 로거 - 전역

# 로거 - 전역 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 4분

로거 API는 이메일 로그에 메시지를 추가하는 인바운드 이메일 작업을 제공합니다.

정보, 경고 및 오류 메시지를 추가하는 메서드를 제공합니다. 추가된 메시지의 소스가 `email.<수신 이메일의 시스템 ID>`로 설정되어 있습니다.

## 로거 - 로그(문자열 메시지) {#ariaid-title2}

지정된 메시지를 이메일 로그에 추가합니다.
{#r_Logger-log_S__table_ggx_nzv_qx__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| msg | 문자열 | 이메일 로그에 추가할 텍스트입니다. 이는 정보 유형 메시지여야 합니다. |
[표 1. 매개변수]

{#r_Logger-log_S__table_ggx_nzv_qx} {#r_Logger-log_S__table_hgx_nzv_qx__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 2. 반환]

{#r_Logger-log_S__table_hgx_nzv_qx}  
이 코드 예제에서는 sys_user 테이블에서 이메일을 쿼리한 다음 보낸 사람 정보를 기반으로 적절한 로거 메서드를 호출합니다.

    var grUser = new GlideRecord("sys_user");
    grUser.addQuery("email", email.from);
    grUser.query();
      if (grUser.next()) {
        if (grUser.user_name) {
          logger.log("Sender found: " + email.from); //Append information message to the email log
          createInc(grUser.sys_id);
        } else {
            logger.logWarning("Sender: " + email.from + " " + "found but no userID found, please take necessary actions"); //Append warning message to the email log.
            createInc(grUser.sys_id);
        }
      } else {
          logger.logError("Sender is not present in the system hence action aborted"); //Append error message to the email log.
          current.setAbortAction(true);
      }

## 로거 - logError(문자열 메시지) {#ariaid-title3}

지정된 오류 메시지를 이메일 로그 파일에 추가합니다.
{#r_Logger-logError_S__table_imm_bfw_qx__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| msg | 문자열 | 이메일 로그에 추가할 오류 메시지 |
[표 3. 매개변수]

{#r_Logger-logError_S__table_imm_bfw_qx} {#r_Logger-logError_S__table_jmm_bfw_qx__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 4. 반환]

{#r_Logger-logError_S__table_jmm_bfw_qx}  
이 코드 예제에서는 sys_user 테이블에서 이메일을 쿼리한 다음 보낸 사람 정보를 기반으로 적절한 로거 메서드를 호출합니다.

    var grUser = new GlideRecord("sys_user");
    grUser.addQuery("email", email.from);
    grUser.query();
      if (grUser.next()) {
        if (grUser.user_name) {
          logger.log("Sender found: " + email.from); //Append information message to the email log
          createInc(grUser.sys_id);
        } else {
            logger.logWarning("Sender: " + email.from + " " + "found but no userID found, please take necessary actions"); //Append warning message to the email log.
            createInc(grUser.sys_id);
        }
      } else {
          logger.logError("Sender is not present in the system hence action aborted"); //Append error message to the email log.
          current.setAbortAction(true);
      }

## 로거 - logWarning(문자열 메시지) {#ariaid-title4}

지정된 경고 메시지를 이메일 로그 파일에 추가합니다.
{#r_Logger-logWarning_S__table_ibk_mbw_qx__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| msg | 문자열 | 이메일 로그에 추가할 경고 메시지 |
[표 5. 매개변수]

{#r_Logger-logWarning_S__table_ibk_mbw_qx} {#r_Logger-logWarning_S__table_jbk_mbw_qx__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 6. 반환]

{#r_Logger-logWarning_S__table_jbk_mbw_qx}  
이 코드 예제에서는 sys_user 테이블에서 이메일을 쿼리한 다음 보낸 사람 정보를 기반으로 적절한 로거 메서드를 호출합니다.

    var grUser = new GlideRecord("sys_user");
    grUser.addQuery("email", email.from);
    grUser.query();
      if (grUser.next()) {
        if (grUser.user_name) {
          logger.log("Sender found: " + email.from); //Append information message to the email log
          createInc(grUser.sys_id);
        } else {
            logger.logWarning("Sender: " + email.from + " " + "found but no userID found, please take necessary actions"); //Append warning message to the email log.
            createInc(grUser.sys_id);
        }
      } else {
          logger.logError("Sender is not present in the system hence action aborted"); //Append error message to the email log.
          current.setAbortAction(true);
      }


