forked from y-scope/yscope-log-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace existing codebase with new-log-viewer and update docs. (y-sco…
- Loading branch information
1 parent
cc4e7bc
commit bc8109f
Showing
241 changed files
with
7,968 additions
and
79,253 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# dependencies | ||
# Dependencies | ||
/node_modules | ||
|
||
# production | ||
# Build | ||
/dist | ||
|
||
# For bundle size analysis | ||
/bundle-stats.json | ||
|
||
# IDEs | ||
/.idea | ||
/.vscode | ||
|
||
# for bundle size analysis | ||
/bundle_stats.json |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,84 @@ | ||
# YScope Log Viewer | ||
|
||
[![Open bug reports](https://img.shields.io/github/issues/y-scope/yscope-log-viewer/bug?label=bugs)](https://github.com/y-scope/yscope-log-viewer/issues?q=is%3Aissue+is%3Aopen+label%3Abug) | ||
[![Open feature requests](https://img.shields.io/github/issues/y-scope/yscope-log-viewer/enhancement?label=feature-requests)](https://github.com/y-scope/yscope-log-viewer/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) | ||
[![CLP on Zulip](https://img.shields.io/badge/zulip-yscope--clp%20chat-1888FA?logo=zulip)](https://yscope-clp.zulipchat.com/) | ||
![Open bug reports][bugs-shield] | ||
![Open feature requests][feature-requests-shield] | ||
![CLP on Zulip][zulip-shield] | ||
|
||
`yscope-log-viewer` is a tool that can be used to view log files that were | ||
compressed using [CLP](https://github.com/y-scope/clp)'s IR stream format. The | ||
viewer can be used to navigate the log file, filter by log level, pretty print | ||
the logs and generate direct links to specific log events. | ||
`yscope-log-viewer` is a tool that can be used to view log files. It currently | ||
supports [CLP][clp-repo]'s compressed log files (IR streams) and JSON log files. | ||
The viewer can be used to navigate the log file, filter by log level, view the | ||
logs with syntax highlighting, and generate direct links to specific log events. | ||
|
||
To start a local server for accessing the application locally, refer to our | ||
[build guide](docs/dev-guide/building.md). | ||
|
||
See the [features in development](#features-in-development) section for upcoming | ||
features. | ||
|
||
# Online Demo | ||
|
||
* A demo of the log viewer can be found at https://yscope.com/log-viewer | ||
* The demo loads a Hadoop YARN log file from the | ||
[hive-24hrs](https://zenodo.org/record/7094921#.Y5JbH33MKHs) log dataset. | ||
* More info on the dataset and other datasets can be found | ||
[here](https://github.com/y-scope/clp/blob/main/docs/Datasets.md). | ||
* To open an IR stream, drag and drop it onto the log viewer or use the open | ||
* The demo loads a Hadoop YARN log file from the [hive-24hrs] log dataset. | ||
* More info on the dataset and other datasets can be found [here][datasets]. | ||
* To open an IR stream, drag and drop it onto the log viewer or use the open | ||
file dialog. | ||
|
||
# Generating IR Stream Logs | ||
|
||
IR stream log files can currently be generated using these libraries: | ||
|
||
* [Python Logging Library](https://github.com/y-scope/clp-loglib-py) | ||
* [Log4j Logging Library](https://github.com/y-scope/log4j1-appenders) | ||
* [Log4j Logging Library][log4j1-appenders] | ||
* [Logback Logging Library][logback-appenders] | ||
* [Python Logging Library][clp-loglib-py] | ||
* Golang Logging Library (in development) | ||
|
||
# Providing Feedback | ||
|
||
You can use GitHub issues to [report a bug](https://github.com/y-scope/yscope-log-viewer/issues/new?assignees=&labels=bug&template=bug-report.yml) | ||
or [request a feature](https://github.com/y-scope/yscope-log-viewer/issues/new?assignees=&labels=enhancement&template=feature-request.yml). | ||
|
||
Join us on [Zulip](https://yscope-clp.zulipchat.com/) to chat with developers | ||
and other community members. | ||
|
||
# Developing `yscope-log-viewer` | ||
|
||
* Clone the repo to get a copy of the code for development | ||
|
||
```shell | ||
git clone https://github.com/yscope/yscope-log-viewer.git | ||
cd yscope-log-viewer | ||
``` | ||
|
||
* Install Node.js using a [release](https://nodejs.org/en/) or via | ||
[nvm](https://github.com/nvm-sh/nvm) | ||
* Install the dependencies: | ||
|
||
```shell | ||
$ npm install | ||
``` | ||
|
||
* Run the development server: | ||
|
||
```shell | ||
$ npm start | ||
``` | ||
|
||
* The application should now be served at http://localhost:3010. | ||
|
||
# Distribute | ||
|
||
To create a build, run the following command and the build will be placed in the | ||
`dist` folder: | ||
|
||
```shell | ||
$ npm run build | ||
``` | ||
|
||
# How does it work? | ||
|
||
`yscope-log-viewer` is written using the ReactJS framework and uses the open | ||
source [monaco-editor](https://github.com/microsoft/monaco-editor). | ||
The log viewer is written using the ReactJS framework and uses the open source | ||
[monaco-editor] and [clp-ffi-js]. | ||
|
||
To open IR stream files, the viewer spawns workers to do the following: | ||
The viewer spawns a worker to assist with computationally intensive tasks such | ||
as: | ||
|
||
* Decompress the Zstd-compressed file | ||
* Build an index of log events | ||
* Paginate the indexed logs based on the number of log events per page | ||
* Decode the CLP-encoded log data as needed | ||
* Deserializing the file and creating an index of logs events. | ||
* Paginating the indexed logs. | ||
* Decoding the deserialized log events into plain text. | ||
|
||
Once the worker decompresses, decodes, and extracts logs, the viewer UI can be | ||
used to navigate the log. Tasks are passed to the worker as needed and changes | ||
are rendered to the UI. | ||
Tasks are passed to the worker as needed and changes are rendered in the UI. | ||
|
||
# Validation | ||
|
||
Currently, there is limited automated testing to verify that changes don't cause | ||
bugs. While this is being developed, the following tests can be run manually: | ||
# Providing Feedback | ||
|
||
* Verify that the following features work: | ||
* Changing the number of events per page | ||
* Navigating to the first/last/next/previous page | ||
* Loading a log file using the open file dialog and dragging & dropping | ||
* Copying a link to a log event | ||
* Change the log level | ||
* Prettifying logs | ||
* Using the keyboard shortcuts | ||
* Perform a build and verify that all features are functional | ||
You can use GitHub issues to [report a bug][report-bug] or | ||
[request a feature][request-feature]. | ||
|
||
## Running tests | ||
Join us on [Zulip][zulip] to chat with developers and other community members. | ||
|
||
We use [`jest`](https://jestjs.io/docs/getting-started) as our testing | ||
framework. Tests can be run with: | ||
# Contributing | ||
|
||
```shell | ||
npm test | ||
``` | ||
See the docs in our [developer guide](docs/dev-guide). | ||
|
||
# Features in Development | ||
|
||
* Dashboard to visualize distribution of log types and log levels | ||
* Opening log files which are larger than 2 GB when uncompressed | ||
* Support for plain text, archived log files, and other requested formats | ||
* Search across file, multiple files or within provided time ranges | ||
* Infinite scrolling instead of using pagination | ||
* Log correlation with sync by timestamp across multiple editors | ||
* Automatic conversion of text log files to IR stream format in the browser | ||
* Deployment of components via NPM | ||
* Pretty printing to enhance the readability of structured data in the logs. | ||
* A dashboard to visualize the distribution of log types and log levels. | ||
* Support for plain text, archived log files, and other requested formats. | ||
* Searching within a file, multiple files, or within provided time ranges. | ||
* Infinite scrolling instead of pagination. | ||
* Log correlation with sync by timestamp across multiple editors. | ||
* Automatic conversion of text log files to IR stream format in the browser. | ||
* Deployment of components via NPM. | ||
|
||
[bugs-shield]: https://img.shields.io/github/issues/y-scope/yscope-log-viewer/bug?label=bugs | ||
[clp-ffi-js]: https://github.com/y-scope/clp-ffi-js | ||
[clp-loglib-py]: https://github.com/y-scope/clp-loglib-py | ||
[clp-repo]: https://github.com/y-scope/clp | ||
[datasets]: https://docs.yscope.com/clp/main/user-guide/resources-datasets | ||
[feature-requests-shield]: https://img.shields.io/github/issues/y-scope/yscope-log-viewer/enhancement?label=feature-requests | ||
[hive-24hrs]: https://zenodo.org/record/7094921#.Y5JbH33MKHs | ||
[log4j1-appenders]: https://github.com/y-scope/log4j1-appenders | ||
[logback-appenders]: https://github.com/y-scope/logback-appenders | ||
[monaco-editor]: https://microsoft.github.io/monaco-editor/ | ||
[report-bug]: https://github.com/y-scope/yscope-log-viewer/issues/new?labels=bug&template=bug-report.yml | ||
[request-feature]: https://github.com/y-scope/yscope-log-viewer/issues/new?labels=enhancement&template=feature-request.yml | ||
[zulip]: https://yscope-clp.zulipchat.com/ | ||
[zulip-shield]: https://img.shields.io/badge/zulip-yscope--clp%20chat-1888FA?logo=zulip |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.