Skip to content

Commit

Permalink
Correct some inconsistencies in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TinnyTerr committed Dec 31, 2024
1 parent 57ad0b1 commit 83fbeff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ For anyone interested with supporting this passion project, please check out [Co
# Logmatic

An overly complicated yet functional logger.
Package: [@tinnyterr/logmatic](https://www.npmjs.com/package/@tinnyterr/logmatic)

## Installation

Expand All @@ -15,7 +16,7 @@ npm i logmatic --save-exact

### For Typescript

Typescript seemingly has a vendetta against index signatures. Whenever possible, set the following setting in your `tsconfig.json` or such:
Whenever possible, set the following setting in your `tsconfig.json` or such:

```json
{
Expand All @@ -41,19 +42,19 @@ As logmatic is currently in a very unstable state, many items may change in the
To get started, import the project into your file and initialise the logger:

```javascript
const { Logger } = require('logmatic');
const { Logger } = require('@tinnyterr/logmatic');
// OR
// import { Logger } from 'logmatic';
// import { Logger } from '@tinnyterr/logmatic';

const log = new Logger("name").loggers;
```

WAIT! If you wish to alter the logger down the line (eg add logger handler functions), you will need to save the Logger class for later. The above code just accesses all the logger function. For example:

```javascript
const { Logger } = require('logmatic');
const { Logger } = require('@tinnyterr/logmatic');
// OR
// import { Logger } from 'logmatic';
// import { Logger } from '@tinnyterr/logmatic';

const logClass = new Logger("name");
const log = logClass.loggers
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tinnyterr/logmatic",
"version": "2.2.0",
"version": "2.2.1",
"homepage": "https://github.com/tinnyterr/logmatic#readme",
"bugs": {
"url": "https://github.com/tinnyterr/logmatic/issues"
Expand Down

0 comments on commit 83fbeff

Please sign in to comment.