<commit_before># docker-logio

Forward all your logs to [Log-Io](http://logio.org/)
and see it to http://localhost:28778

## Usage as a Container

### Docker Compose

```
cat >docker-compose.yml <<EOF
logs:
  image: gerchardon/docker-logio
  links:
   - logio:logio
  volumes:
   - /var/run/docker.sock:/var/run/docker.sock
  command: -h logio -n docker
  privileged: true
logio:
  image: temal/logio-server
  ports:
   - 28777:28777
   - 28778:28778
EOF
docker-compose up
```

### Manualy

```
docker run -d --name logio -p 28777:28777 -p 28778:28778 temal/logio-server
docker run -d --privileged --link logio:logio -v /var/run/docker.sock:/var/run/docker.sock gerchardon/docker-logio -n `uname -n` -h logio
```

## Usage as CLI

1. ```npm install -g log.io --user "ubuntu"```
2. ```npm install docker-logio -g```
3. ```docker-logio -n docker```

## How it works

This module wraps four [Docker APIs](https://docs.docker.com/reference/api/docker_remote_api_v1.17/):

* `POST /containers/{id}/attach`, to fetch the logs<commit_msg>Update readme with Sample app<commit_after># docker-logio

Forward all your logs to [Log-Io](http://logio.org/)
and see it to http://localhost:28778

## Usage as a Container

### Docker Compose

```
cat >docker-compose.yml <<EOF
logs:
  image: gerchardon/docker-logio
  links:
   - logio:logio
  volumes:
   - /var/run/docker.sock:/var/run/docker.sock
  command: -h logio -n docker
  privileged: true
logio:
  image: temal/logio-server
  ports:
   - 28777:28777
   - 28778:28778
EOF
docker-compose up
```

### Manualy

```
docker run -d --name logio -p 28777:28777 -p 28778:28778 temal/logio-server
docker run -d --privileged --link logio:logio -v /var/run/docker.sock:/var/run/docker.sock gerchardon/docker-logio -n `uname -n` -h logio
docker run -it -d -p 8000:8000 python:3.5-slim python -m http.server
```

See LogIo http://localhost:28778 and generate app log with http://localhost:8000

## Usage as CLI

1. ```npm install -g log.io --user "ubuntu"```
2. ```npm install docker-logio -g```
3. ```docker-logio -n docker```

## How it works

This module wraps four [Docker APIs](https://docs.docker.com/reference/api/docker_remote_api_v1.17/):

* `POST /containers/{id}/attach`, to fetch the logs
{'fraction_non_alphanumeric': 0.15746971736204576, 'fraction_numerical': 0.054284432480933155, 'mean_word_length': 3.46, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5573935', 'n_tokens_mistral': 971, 'n_tokens_neox': 828, 'n_words': 230}