Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n4kz/kaldr
Simple and fast logger for client-side errors
https://github.com/n4kz/kaldr
Last synced: about 2 months ago
JSON representation
Simple and fast logger for client-side errors
- Host: GitHub
- URL: https://github.com/n4kz/kaldr
- Owner: n4kz
- License: lgpl-3.0
- Created: 2013-01-13T21:50:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-16T22:16:59.000Z (about 11 years ago)
- Last Synced: 2024-11-16T14:36:10.247Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Kaldr
Simple and fast logger for client-side errors
# Installation
```bash
# Global
npm -g install kaldr# Local
npm install kaldr
```If you have chosen local installation, check your `PATH` environment variable. `npm` creates symlinks to
all binaries in `~/node_modules/.bin` hidden folder. So you may want to prepend it to `PATH`.# Server setup
```bash
# Log to console
kaldr# Log to file
kaldr >> client.log &# Test kaldr
curl -b 'message=Hello, World!' localhost:8080/kaldr.log
```# Client setup
Load kaldr
```html```
Send message to kaldr
```js
var logger = document.getElementById('logger'),
src = logger.getAttribute('src').split('#')[0];window.onerror = function (mesage, file, line) {
logger.setAttribute('src', src + '#' + message + ' in ' + file + ' at line ' + line);
};
```# Copyright and License
Copyright 2013 Alexander Nazarov. All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.