Skip to content

Commit

Permalink
several updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioricali committed Aug 2, 2017
1 parent 0948e27 commit 9daef64
Show file tree
Hide file tree
Showing 11 changed files with 424 additions and 209 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Now constructor return `this`
- Prefix options
- Humanize options
- Server
- Server log
- Process info
- Browser
- User agent info
- Browser log
- User agent info

### Changed
- Server
Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Add before others scripts
<script>katch()</script>
```

### Configuration
### Examples
```javascript
const katch = require('katch');

Expand All @@ -72,20 +72,20 @@ katch.on('error', (error, params) => {
```javascript
const katch = require('katch');

katch.config = {
katch.setup({
writeFile: false
};
});

try {
foo();
bar();
} catch (e) {
katch.captureError(e, {
katch.error(e, {
customParam: 'hello horror'
});
}

//... or use wrap method
//... or using a wrap method

katch.wrap(() => {
foo();
Expand All @@ -99,6 +99,18 @@ katch.on('error', (error, params) => {
});
```

### Configuration
```javascript
const config = {
logging: true, // write log
writeFile: { // only server
prefix: '', // add a prefix to file
humanize: true, // write a readable log
folderPath: './logs' // folder path
}
}
```

## Changelog
You can view the changelog <a target="_blank" href="https://github.com/fabioricali/katch/blob/master/CHANGELOG.md">here</a>

Expand Down
Loading

0 comments on commit 9daef64

Please sign in to comment.