<commit_before>Go Get My Logs
==============

Search and display Logstash formatted logs from an Elasticsearch server.

Usage
-----
```
usage: ggml [<flags>] [<query>]

Search for logs in a Logstash Elasticsearch index.

Flags:
  --help              Show help.
  -u, --url=http://127.0.0.1:9200
                      Server URL
  -m, --must=MUST     Must match
  -x, --must-not=MUST-NOT
                      Must not match
  --start=START       Oldest timestamp to match
  --end=END           Newest timestamp to match
  -d, --duration=15m  Width of timestamp window
  -t, --tail          Tail event stream
  -n, --num=100       Number of results to fetch
  --index-format="logstash-%Y.%m.%d"
                      Index name format
  -o, --output-format="{@timestamp} {host} {type} {level}: {message}"
                      Output format
  --verbose           Enable verbose mode
  --debug             Enable debug mode
  --version           Show application version.

Args:
  [<query>]  Elasticsearch query string
```

Some settings can be provided via environment variables:
* `GGML_URL`: Server URL
* `GGML_OUTPUT`: Output format

Examples:
```
# Custom output format for a specific event type
$ export GGML_OUTPUT="{@timestamp} {level} {channel} {host} {wiki} - {message}"

# Query string
$ ggml type:mediawiki AND NOT channel:api-feature-usage AND host:mw1070

# With must/mustNot filters (filters are cached by Elastcisearch)
$ ggml -m type:mediawiki -x channel:api-feature-usage -m host:mw1070
```

License
-------

Go Get My Logs is licensed under the MIT license. See the `LICENSE` file for
more details.<commit_msg>Add simple build instructions to README<commit_after>Go Get My Logs
==============

Search and display Logstash formatted logs from an Elasticsearch server.

Usage
-----
```
usage: ggml [<flags>] [<query>]

Search for logs in a Logstash Elasticsearch index.

Flags:
  --help              Show help.
  -u, --url=http://127.0.0.1:9200
                      Server URL
  -m, --must=MUST     Must match
  -x, --must-not=MUST-NOT
                      Must not match
  --start=START       Oldest timestamp to match
  --end=END           Newest timestamp to match
  -d, --duration=15m  Width of timestamp window
  -t, --tail          Tail event stream
  -n, --num=100       Number of results to fetch
  --index-format="logstash-%Y.%m.%d"
                      Index name format
  -o, --output-format="{@timestamp} {host} {type} {level}: {message}"
                      Output format
  --verbose           Enable verbose mode
  --debug             Enable debug mode
  --version           Show application version.

Args:
  [<query>]  Elasticsearch query string
```

Some settings can be provided via environment variables:
* `GGML_URL`: Server URL
* `GGML_OUTPUT`: Output format

Examples:
```
# Custom output format for a specific event type
$ export GGML_OUTPUT="{@timestamp} {level} {channel} {host} {wiki} - {message}"

# Query string
$ ggml type:mediawiki AND NOT channel:api-feature-usage AND host:mw1070

# With must/mustNot filters (filters are cached by Elastcisearch)
$ ggml -m type:mediawiki -x channel:api-feature-usage -m host:mw1070
```

Build
-----
```
export GOPATH=~/golang # Or any other directory you'd like to use
mkdir -p $GOPATH

go get github.com/bd808/ggml

$GOPATH/bin/ggml --help
```

License
-------

Go Get My Logs is licensed under the MIT license. See the `LICENSE` file for
more details.
{'fraction_non_alphanumeric': 0.12212852573422507, 'fraction_numerical': 0.014248328002326258, 'mean_word_length': 2.467741935483871, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '548383', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1015, 'n_words': 369}