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

# Set logger

> This operation enables activity logging for the UCW SDK.

<Tip>
  Try [Cobo WaaS Skill](/v2/guides/overview/cobo-waas-skill) in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
</Tip>

<CodeGroup>
  ```Swift iOS theme={null}
  public func setLogger(completion: @escaping (String?, String?) -> Void)
  ```

  ```Dart Flutter theme={null}
  Future<void> setLogger(Function(String level, String message)? logCallback) async
  ```
</CodeGroup>

<RequestExample>
  ```Swift iOS theme={null}
  setLogger { level, message in
      print("Log Level: \(level), Log Message: \(message)")
  }
  ```

  ```Dart Flutter theme={null}
  await setLogger((level, message) {
      print("Log Level: $level, Log Message: $message");
  });
  ```
</RequestExample>

## Parameters

<ParamField path="logCallback" type="function">
  A callback function that receives log level and log message parameters to monitor the logger activity.

  <Expandable title="child attributes">
    <ParamField path="level" type="string">
      The log level. Possible values include:

      * `panic`: The log level is Panic.
      * `fatal`: The log level is Fatal.
      * `error`: The log level is Error.
      * `warn`: The log level is Warning.
      * `info`: The log level is Info.
      * `debug`: The log level is Debug.
    </ParamField>

    <ParamField path="message" type="string">
      The log message.
    </ParamField>
  </Expandable>
</ParamField>
