2022-10-21 17:16:00 +02:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [enableLog](./bitburner.ns.enablelog.md)
|
|
|
|
|
|
|
|
## NS.enableLog() method
|
|
|
|
|
2024-06-28 11:37:04 +02:00
|
|
|
Enables logging for the given NS function.
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Signature:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
enableLog(fn: string): void;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
2024-06-28 11:37:04 +02:00
|
|
|
| fn | string | Name of the NS function for which to enable logging. |
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Returns:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
RAM cost: 0 GB
|
|
|
|
|
2024-08-27 04:49:44 +02:00
|
|
|
Logging can be enabled for all functions by passing `ALL` as the argument.
|
|
|
|
|
|
|
|
For specific interfaces, use the form "namespace.functionName". (e.g. "ui.setTheme")
|
2024-06-28 11:37:04 +02:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
ns.enableLog("hack"); // Enable logging for `ns.hack()`
|
|
|
|
|
|
|
|
```
|
2022-10-21 17:16:00 +02:00
|
|
|
|