> For the complete documentation index, see [llms.txt](https://tampered-console.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tampered-console.js.org/v2/namespace.md).

# Namespace

Namespaces helps you track your console. It's concatenated to the prefix to label what is being printed to the console. There are multiple ways to enable the namespace feature.

### Instantiated Console

```javascript
const Console = require('tampered-console');
new Console('namespace').log(args);
```

### Global Console

#### Individual Namespace

There is an option where the global console can be labeled individually. If this is enabled, the console method will have to be invoked twice as it returns a function. First for the namespace and next for the arguments.&#x20;

{% code title="index.js" %}

```javascript
const Console = require('tampered-console');
Console.globalConsole({ namespace: true });
```

{% endcode %}

{% code title="app.js" %}

```javascript
console.log('namespace')(args);
```

{% endcode %}

#### Uniform Namespace

Uniform namespace labels your console every time it logs.

There are two ways to achieve a uniform namespace. First is to pass the namespace as string in the `globalConsole`or pass the namespace as `namespace` property value.

```javascript
const Console = require('tampered-console');
Console.globalConsole('namespace');
```

```javascript
const Console = require('tampered-console');
Console.globalConsole({ namespace: 'namespace' });
```
