<commit_before>le.js
=====

Client-side JavaScript library for [Logentries](http://www.logentries.com).

[![Build Status](https://travis-ci.org/logentries/le_js.png?branch=master)](https://travis-ci.org/logentries/le_js)

Features
--------

* Small: ~2k (minified)
* Cross-browser compatible
* No external dependencies
* Simple API

Usage
-----

* Get the latest build [here](https://github.com/logentries/le_js/releases/download/v0.1/le.min.js) or download a [full release](https://github.com/logentries/le_js/releases).

* Include the library in your page:

```html
<html lang="en">
  <head>
    <title>your page</title>
    <script src="/js/le.min.js"></script>
    <script>
      // Create a log stream...
      LE.init('YOUR-TOKEN');
      // ...and log some events!
      LE.log("Hello, logger!");
    </script>
  </head>
  ...

```
Want to send all browser exceptions to Logentries? Initialize the logger with an object:

```javascript
LE.init({token: 'YOUR-TOKEN', onerror: true});
```

sets a `window.onerror` callback for the given stream, invoking the current handler too if it exists.

Need a token? Get a free [account](https://logentries.com/quick-start/) if you don't already have one.<commit_msg>add link to wiki<commit_after>le.js
=====

Client-side JavaScript library for [Logentries](http://www.logentries.com).

[![Build Status](https://travis-ci.org/logentries/le_js.png?branch=master)](https://travis-ci.org/logentries/le_js)

Want to get under the hood? Check out the [wiki](https://github.com/logentries/le_js/wiki)

Features
--------

* Small: ~2k (minified)
* Cross-browser compatible
* No external dependencies
* Simple API

Usage
-----

* Get the latest build [here](https://github.com/logentries/le_js/releases/download/v0.1/le.min.js) or download a [full release](https://github.com/logentries/le_js/releases).

* Include the library in your page:

```html
<html lang="en">
  <head>
    <title>your page</title>
    <script src="/js/le.min.js"></script>
    <script>
      // Create a log stream...
      LE.init('YOUR-TOKEN');
      // ...and log some events!
      LE.log("Hello, logger!");
    </script>
  </head>
  ...

```
Want to send all browser exceptions to Logentries? Initialize the logger with an object:

```javascript
LE.init({token: 'YOUR-TOKEN', onerror: true});
```

sets a `window.onerror` callback for the given stream, invoking the current handler too if it exists.

Need a token? Get a free [account](https://logentries.com/quick-start/) if you don't already have one.
{'fraction_non_alphanumeric': 0.16832076220722508, 'fraction_numerical': 0.0023818975784041284, 'mean_word_length': 3.573502722323049, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2291522', 'n_tokens_mistral': 837, 'n_tokens_neox': 810, 'n_words': 224}