https://github.com/adrielcodeco/vscode-extensions-logging
https://github.com/adrielcodeco/vscode-extensions-logging
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/adrielcodeco/vscode-extensions-logging
- Owner: adrielcodeco
- License: mit
- Created: 2020-09-05T18:31:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T14:01:54.000Z (over 3 years ago)
- Last Synced: 2025-07-08T16:05:35.052Z (11 months ago)
- Language: TypeScript
- Size: 1.52 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
vscode-extensions-logging
This package help to control the logging on vscode extensions using `winston`.
## Install
using npm
```bash
npm i -D vscode-extensions-logging
```
using yarn
```bash
yarn add -D vscode-extensions-logging
```
## How to use it `?`
Call `ExtensionsLogging.register` static method on `ExtensionsLogging` class passing the extension name or extension id, this extension name will appear in output window on vscode
**example:**
```typescript
import { ExtensionsLogging } from 'vscode-extensions-logging'
export function activate (context: vscode.ExtensionContext) {
const EXTENSION_ID = 'extension.name'
const logger = ExtensionsLogging.register(EXTENSION_ID)
logger.info('initializing extension')
}
```
To control the log level, pass the log level on register. Default log level: `info`
```typescript
ExtensionsLogging.register(EXTENSION_ID, 'warn')
```