[**SixL client API**](../../README.md)

***

[SixL client API](../../README.md) / [system](../README.md) / ConsoleMp

# Interface: ConsoleMp

The console: writes lines to the client's log.

## Remarks

The lines go to the core's log, not to an in-game console: the game has no console window, so `clear` and `reset`
do nothing. `verbosity` filters this object's lines; `console.log` and the runtime's own lines are not filtered.

## Example

```ts
mp.console.logInfo('client started');
```

## Properties

### verbosity

> **verbosity**: `string`

The lowest level of `mp.console` lines that are written: `'info'` (all, the start value), `'warning'`, `'error'`
or `'fatal'`. A line below it is dropped.

#### Remarks

Only the `log*` methods of `mp.console` are filtered; an unknown value lets every line through.

#### Example

```ts
mp.console.verbosity = 'warning';
mp.console.logInfo('not written');
mp.console.logWarning('written');
```

## Methods

### clear()

> **clear**(): `void`

Clears the game console. There is no game console, so it does nothing.

#### Returns

`void`

#### Remarks

Partial: no effect; the log is not cleared.

#### Example

```ts
mp.console.clear();
```

***

### logError()

> **logError**(`message`, `save?`, `saveAsync?`): `void`

Logs an error line.

#### Parameters

##### message

`string`

The text. Any value is converted to a string.

##### save?

`boolean`

Accepted for RAGE MP compatibility; ignored (the line is always written to the log).

##### saveAsync?

`boolean`

Accepted for RAGE MP compatibility; ignored.

#### Returns

`void`

#### Example

```ts
mp.console.logError('could not save the settings');
```

***

### logFatal()

> **logFatal**(`message`, `save?`, `saveAsync?`): `void`

Logs a fatal line. It is written to the core's log with the `fatal` level; nothing is stopped.

#### Parameters

##### message

`string`

The text. Any value is converted to a string.

##### save?

`boolean`

Accepted for RAGE MP compatibility; ignored (the line is always written to the log).

##### saveAsync?

`boolean`

Accepted for RAGE MP compatibility; ignored.

#### Returns

`void`

#### Example

```ts
mp.console.logFatal('the settings file is corrupt');
```

***

### logInfo()

> **logInfo**(`message`, `save?`, `saveAsync?`): `void`

Logs an informational line.

#### Parameters

##### message

`string`

The text. Any value is converted to a string.

##### save?

`boolean`

Accepted for RAGE MP compatibility; ignored (the line is always written to the log).

##### saveAsync?

`boolean`

Accepted for RAGE MP compatibility; ignored.

#### Returns

`void`

#### Example

```ts
mp.console.logInfo('loaded ' + count + ' items');
```

***

### logWarning()

> **logWarning**(`message`, `save?`, `saveAsync?`): `void`

Logs a warning line.

#### Parameters

##### message

`string`

The text. Any value is converted to a string.

##### save?

`boolean`

Accepted for RAGE MP compatibility; ignored (the line is always written to the log).

##### saveAsync?

`boolean`

Accepted for RAGE MP compatibility; ignored.

#### Returns

`void`

#### Example

```ts
mp.console.logWarning('no config, using defaults');
```

***

### reset()

> **reset**(): `void`

Resets the game console. There is no game console, so it does nothing.

#### Returns

`void`

#### Remarks

Partial: no effect.

#### Example

```ts
mp.console.reset();
```
