This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch v2.0.0Release
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git
The following commit(s) were added to refs/heads/v2.0.0Release by this push:
new 22b03d3 minor mods to README and example
22b03d3 is described below
commit 22b03d375e02e078994ae4828778f46d9262d3f5
Author: poorejc <[email protected]>
AuthorDate: Fri Jun 21 21:19:15 2019 -0400
minor mods to README and example
---
README.md | 14 +++++++++++---
example/README.md | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 4ff69f9..a06b318 100755
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Additional documentation can be found at our [project
website](http://flagon.inc
## Prerequsites
-To build UserALE.js, you will need to download our source (here), our [release
distributions](http://flagon.incubator.apache.org/releases/) or install via
[NPM and Node.js](https://www.npmjs.com/package/useralejs).
+To build UserALE.js, you will need to download our source (here), our [release
distributions](http://flagon.incubator.apache.org/releases/) or include in your
project via the [flagon-useralejs NPM
module](https://www.npmjs.com/package/flagon-useralejs).
UserALE.js utilizes NPM for package and dependency management. Execute the
following to install dependencies.
```
@@ -22,6 +22,8 @@ npm install
npm ls --depth=0
```
+Pre-tested and pre-built UserALE.js script are included in the [/build
dir](https://github.com/apache/incubator-flagon-useralejs/tree/master/build) in
our repositories, release artifiacts, and our [NPM
module](https://www.npmjs.com/package/flagon-useralejs). However, you can
modify and build your own versions of these scripts with the following steps:
+
## Build
To build UserALE.js:
@@ -55,9 +57,9 @@ Any failing tests will also be logged in the terminal. If
there are failing test
## Use and Configure
-To start logging with UserALE.js, you can either include our script in the web
application to be logged, or use our WebExtension to gather logs across any
page a user visits.
+To start logging with UserALE.js, you can either include our script in the web
application to be logged, or use our
[WebExtension](https://github.com/apache/incubator-flagon-useralejs/tree/master/src/UserALEWebExtension)
to gather logs across any page a user visits.
-To instrument a specific project, simply include this script tag on the page:
+To collect logs from a specific project, simply include this script tag on the
page:
```html
<script src="/path/to/userale-2.0.0.min.js"></script>
@@ -85,10 +87,14 @@ The complete list of configurable options is:
If you're interested in using our WebExtension to log user activity across all
pages they visit, check out our browser specific instructions
[here](https://github.com/apache/incubator-flagon-useralejs/blob/FLAGON-336/src/UserALEWebExtension/README.md).
+You can also test out UserALE.js behavior with different script tag parameters
using our ['example' test
utility](https://github.com/apache/incubator-flagon-useralejs/tree/master/example).
+
## Customizing your logs
For some applications, it may be desirable to filter logs based on some
runtime parameters or to enhance the logs with information available to the
app. To support this use-case, there is an API exposed against the global
UserALE object.
+The [flagon-useralejs NPM
module](https://www.npmjs.com/package/flagon-useralejs) exposes UserALE.js
functions for use in the NPM environment. However, this API is a cleaner, more
intuitive way of modifying UserALE.js behavior to suite your needs.
+
The two functions exposed are the `setLogFilter` and `setLogMapper` functions.
These allow dynamic modifications to the logs at runtime, but before they are
shipped to the server.
Here is an example of a filter that bounces out unwanted log and event types
from your logging stream:
@@ -132,6 +138,8 @@ Here is an example of a mapping function that adds
customizable labels to events
Even with this small API, it is possible to compose very powerful logging
capabilities and progressively append additionally app-specific logic to your
logs.
+You can experiment with these functions in our [example test
utility](https://github.com/apache/incubator-flagon-useralejs/tree/master/example).
+
## Contributing
Contributions are welcome! Simply [submit an issue
report](https://issues.apache.org/jira/browse/FLAGON) for problems you
encounter or a pull request for your feature or bug fix. The core team will
review it and work with you to incorporate it into UserALE.js. If you want to
become a contributor to the project, see our [contribution
guide](http://flagon.incubator.apache.org/docs/contributing/).
diff --git a/example/README.md b/example/README.md
index b138add..3ada5bb 100755
--- a/example/README.md
+++ b/example/README.md
@@ -20,7 +20,7 @@ $npm run example:watch
## Running the Example
Open index.html in your favorite html editor (Notepad++,Brackets,etc.). Modify
the "src" line of the UserALE.js script tag so that it
-refers to the filepath of your useralejs-1.0.0.min.js script
("file:///...[your file path].../build/userale-1.0.0.min.js").
+refers to the filepath of your useralejs-2.0.0.min.js script
("file:///...[your file path].../build/userale-2.0.0.min.js").
Save the index.html file, then open index.html in your browser (you can drag
it directly into a tab). You will see a very simple HTML Webpage with a button
labeled, "Click Me!".