---
title: "MTLogger | Mobile sdk | Mobile sdk ios | Ios"
description: "Logger class used for SDK logs."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTLogger

```
public class MTLogger
```

Logger class used for SDK logs.

-   `[infoMarker](#/s:11MapTilerSDK8MTLoggerC10infoMarkerSSvpZ)`
    
    Log marker for information messages.
    
    #### Declaration
    
    Swift
    
    ```
    public static let infoMarker: String
    ```
    
-   `[log(_:type:)](#/s:11MapTilerSDK8MTLoggerC3log_4typeySS_AA9MTLogTypeOtFZ)`
    
    Add a log.
    
    #### Declaration
    
    Swift
    
    ```
    public static func log(_ message: String, type: MTLogType)
    ```
    
-   `[printLogs()](#/s:11MapTilerSDK8MTLoggerC9printLogsyyFZ)`
    
    Print all current logs to the console.
    
    #### Declaration
    
    Swift
    
    ```
    public static func printLogs()
    ```
    
-   `[setCustomLogger(_:)](#/s:11MapTilerSDK8MTLoggerC15setCustomLoggeryyAA10MTLoggable_pFZ)`
    
    Inject a custom logger conforming to the MTLoggable protocol.
    
    #### Declaration
    
    Swift
    
    ```
    public static func setCustomLogger(_ logger: MTLoggable)
    ```
