---
name: "log4c_priority.h"
section: "3"
platform: "linux"
package: "liblog4c-doc"
version: "1.2.4-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/log4c_priority.h"
---

# log4c\_priority.h(3)

The priority class provides importance levels with which one can categorize log messages.

## NAME

priority.h - The priority class provides importance levels with which one can categorize log messages.

## SYNOPSIS

`#include <log4c/defs.h>`\

### Enumerations

enum **log4c\_priority\_level\_t** { **LOG4C\_PRIORITY\_FATAL** = 000, **LOG4C\_PRIORITY\_ALERT** = 100, **LOG4C\_PRIORITY\_CRIT** = 200, **LOG4C\_PRIORITY\_ERROR** = 300, **LOG4C\_PRIORITY\_WARN** = 400, **LOG4C\_PRIORITY\_NOTICE** = 500, **LOG4C\_PRIORITY\_INFO** = 600, **LOG4C\_PRIORITY\_DEBUG** = 700, **LOG4C\_PRIORITY\_TRACE** = 800, **LOG4C\_PRIORITY\_NOTSET** = 900, **LOG4C\_PRIORITY\_UNKNOWN** = 1000 }\

### Functions

const char \* **log4c\_priority\_to\_string** (int a\_priority)\
 int **log4c\_priority\_to\_int** (const char \*a\_priority\_name)\

## Detailed Description

The priority class provides importance levels with which one can categorize log messages.

## Enumeration Type Documentation

### enum log4c\_priority\_level\_t

Predefined Levels of priorities. These correspond to the priority levels used by [syslog(3)](/syslog/3.md).

**Enumerator**

- *LOG4C\_PRIORITY\_FATAL*

  *fatal*

- *LOG4C\_PRIORITY\_ALERT*

  *alert*

- *LOG4C\_PRIORITY\_CRIT*

  *crit*

- *LOG4C\_PRIORITY\_ERROR*

  *error*

- *LOG4C\_PRIORITY\_WARN*

  *warn*

- *LOG4C\_PRIORITY\_NOTICE*

  *notice*

- *LOG4C\_PRIORITY\_INFO*

  *info*

- *LOG4C\_PRIORITY\_DEBUG*

  *debug*

- *LOG4C\_PRIORITY\_TRACE*

  *trace*

- *LOG4C\_PRIORITY\_NOTSET*

  *notset*

- *LOG4C\_PRIORITY\_UNKNOWN*

  *unknown*

## Function Documentation

### int log4c\_priority\_to\_int (const char \* a\_priority\_name)

**Parameters**

*a\_priority\_name a priority string name.*

**Returns**

*the given numeric value of the priority.*

*References* **LOG4C\_PRIORITY\_UNKNOWN***.*

### const char \* log4c\_priority\_to\_string (int a\_priority)

**Parameters**

*a\_priority a numeric value of the priority.*

**Returns**

*the given priority string name.*

## Author

*Generated automatically by Doxygen for log4c from the source code.*
