---
name: "SDL_SetLogPriorityPrefix"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetLogPriorityPrefix"
---

# SDL\_SetLogPriorityPrefix(3)

Set the text prepended to log messages of a given priority.

## NAME

SDL\_SetLogPriorityPrefix - Set the text prepended to log messages of a given priority.

## HEADER FILE

Defined in SDL3/SDL\_log.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_SetLogPriorityPrefix(SDL\_LogPriority priority, const char \*prefix);**

## DESCRIPTION

By default  **SDL\_LOG\_PRIORITY\_INFO**\
  and below have no prefix, and  **SDL\_LOG\_PRIORITY\_WARN**\
  and higher have a prefix showing their priority, e.g. "WARNING: ".

## FUNCTION PARAMETERS

- *priority*

  the  **SDL\_LogPriority**\
    to modify.

- *prefix*

  the prefix to use for that log priority, or NULL to use no prefix.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetLogPriorities**(3)](/SDL_SetLogPriorities/3.md), **•**(3), [**SDL\_SetLogPriority**(3)](/SDL_SetLogPriority/3.md)
