Skip to content

Commit

Permalink
Merge pull request #42 from vania-pooh/master
Browse files Browse the repository at this point in the history
Added documentation about logging configuration file (fixes #39)
  • Loading branch information
aandryashin committed Apr 6, 2017
2 parents 9b0a7c1 + c47f67f commit bd1ab94
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The following flags are supported by ```selenoid``` command:
Session idle timeout in time.Duration format (default 1m0s)
```

### Main Configuration File
### Browsers Configuration File

Selenoid uses simple JSON configuration files of the following format (we use **#** for comments here):
```
Expand Down Expand Up @@ -149,6 +149,32 @@ When used in Docker container Selenoid will have timezone set to UTC. To set cus
$ docker run -d --name selenoid -p 4444:4444 -e TZ=Europe/Moscow -v /etc/selenoid:/etc/selenoid:ro -v /var/run/docker.sock:/var/run/docker.sock aandryashin/selenoid:1.0.0
```

### Logging Configuration File
By default Docker container logs are saved to host machine hard drive. When using Selenoid for local development that's ok. But in big Selenium cluster you may want to send logs to some centralized storage like [Logstash](https://www.elastic.co/products/logstash) or [Graylog](https://www.graylog.org/). Docker provides such functionality by so-called [logging drivers](https://docs.docker.com/engine/admin/logging/overview/). Selenoid logging configuration file allows to specify which logging driver to use globally for all started Docker containers with browsers. Configuration file has the following format:
```
{
"Type" : "<driver-type>",
"Config" : {
"key1" : "value1",
"key2" : "value2"
}
}
```
Here **<driver-type>** - is a supported Docker logging driver type like ```syslog```, ```journald``` or ```awslogs```. ```Config``` is a list of key-value pairs used to configure selected driver. For example these Docker logging parameters...
```
--log-driver=syslog --log-opt syslog-address=tcp://192.168.0.42:123 --log-opt syslog-facility=daemon
```
... are equivalent to the following Selenoid logging configuration:
```
{
"Type" : "syslog",
"Config" : {
"syslog-address" : "tcp://192.168.0.42:123",
"syslog-facility" : "daemon"
}
}
```

### Reloading Configuration

To reload configuration without restart send SIGHUP:
Expand Down

0 comments on commit bd1ab94

Please sign in to comment.