-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tree-explorer): update bson verison, align README and add type de…
…finitions to package.json
- Loading branch information
Showing
2 changed files
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
# Devtools Shared Monorepo | ||
# mongodb-log-writer | ||
|
||
This repository contains packages that are shared dependencies of Compass, the MongoDB extension for VSCode and MongoSH. | ||
A library for writing MongoDB logv2 messages. | ||
|
||
To start working: | ||
```js | ||
import { MongoLogManager, mongoLogId } from 'mongodb-log-writer'; | ||
|
||
``` | ||
npm run bootstrap | ||
``` | ||
|
||
Lint code and dependencies | ||
|
||
``` | ||
npm run check | ||
``` | ||
const manager = new MongoLogManager({ | ||
directory: os.homedir() + '/.app-logs', | ||
retentionDays: 30, | ||
onwarn: console.warn, | ||
onerror: console.error, | ||
gzip: true | ||
}); | ||
await manager.cleanupOldLogfiles(); | ||
|
||
Run tests | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
To create a new workspace: | ||
|
||
``` | ||
npm run create-workspace | ||
const writer = manager.createLogWriter(); | ||
writer.info('component', mongoLogId(12345), 'context', 'message', { foo: 'bar' }); | ||
``` | ||
|
||
## Contributing | ||
## LICENSE | ||
|
||
For contributing, please refer to [CONTRIBUTING.md](CONTRIBUTING.md) | ||
Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters