ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
60 lines (29 loc) • 1.26 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [getNewLogger](./ibm-cloud-sdk-core.getnewlogger.md)
## getNewLogger() function
Return a new logger, formatted with a particular name. The logging functions, in order of increasing verbosity, are: `error`<!-- -->, `warn`<!-- -->, `info`<!-- -->, `verbose`<!-- -->, and `debug`<!-- -->.
The logger will be an instance of the `debug` package and utilizes its support for configuration with environment variables.
Additionally, the logger will be turned on automatically if the "NODE\_DEBUG" environment variable is set to "axios".
**Signature:**
```typescript
export declare function getNewLogger(moduleName: string): SDKLogger;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
moduleName
</td><td>
string
</td><td>
the namespace for the logger. The name will appear in the logs and it will be the name used for configuring the log level.
</td></tr>
</tbody></table>
**Returns:**
[SDKLogger](./ibm-cloud-sdk-core.sdklogger.md)
the new logger