feat: set log timezone, closes #56
Implement a CLI arg, and config file setting, for changing the timezone of the Docker logs timestamp
This commit is contained in:
@@ -100,8 +100,7 @@ curl https://raw.githubusercontent.com/mrjackwills/oxker/main/install.sh | bash
|
||||
```shell
|
||||
oxker
|
||||
```
|
||||
|
||||
In application controls
|
||||
In application controls, these can be customized with the [config file](#Config-File)
|
||||
| button| result|
|
||||
|--|--|
|
||||
| ```( tab )``` or ```( shift+tab )``` | Change panel, clicking on a panel also changes the selected panel.|
|
||||
@@ -118,6 +117,7 @@ In application controls
|
||||
| ```( esc )``` | Close dialog.|
|
||||
|
||||
Available command line arguments
|
||||
|
||||
| argument|result|
|
||||
|--|--|
|
||||
|```-d [number > 0]```| Set the minimum update interval for docker information in milliseconds. Defaults to 1000 (1 second).|
|
||||
@@ -126,11 +126,30 @@ Available command line arguments
|
||||
|```-t```| Remove timestamps from each log entry.|
|
||||
|```-s```| If running via Docker, will display the oxker container.|
|
||||
|```-g```| No TUI, essentially a debugging mode with limited functionality, for now.|
|
||||
|```--config-file [string]```| Location of a `config.toml`/`config.json`/`config.jsonc`.|
|
||||
|```--host [string]```| Connect to Docker with a custom hostname. Defaults to `/var/run/docker.sock`. Will use `$DOCKER_HOST` environment variable if set.|
|
||||
|```--no-stderr```| Do not include stderr output in logs.|
|
||||
|```--save-dir [string]```| Save exported logs into a custom directory. Defaults to `$HOME`.|
|
||||
|```--timezone [string]```| Display the Docker logs timestamps in a given [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Defaults to `Etc/UTC`.|
|
||||
|```--use-cli```| Use the Docker application when exec-ing into a container, instead of the Docker API.|
|
||||
|
||||
### Config File
|
||||
|
||||
|
||||
A config file enables the user to persist settings, it also enables the user to create a custom keymap, and set the color scheme used by the application.
|
||||
<br>
|
||||
<br>
|
||||
By default, if not found, `oxker` will create a config file in the user's local config directory. Command line arguments take priority over values from the config file.
|
||||
<br>
|
||||
<br>
|
||||
`oxker` supports `.toml`,`.json`, and `.jsonc` file formats. Examples of each can be found in the [example_config](https://github.com/mrjackwills/oxker/tree/main/example_config) directory.
|
||||
|
||||
If running an `oxker` container, the default config location will be `/config.toml` rather than the automatically detected platform-specific local config directory.
|
||||
|
||||
```shell
|
||||
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock:ro -v /some/location/config.toml:/config.toml:ro oxker
|
||||
```
|
||||
|
||||
## Build step
|
||||
|
||||
### x86_64
|
||||
@@ -163,8 +182,10 @@ If no memory information available, try appending either ```/boot/cmdline.txt```
|
||||
|
||||
see <a href="https://forums.raspberrypi.com/viewtopic.php?t=203128" target='_blank' rel='noopener noreferrer'>https://forums.raspberrypi.com/viewtopic.php?t=203128</a> and <a href="https://github.com/docker/for-linux/issues/1112" target='_blank' rel='noopener noreferrer'>https://github.com/docker/for-linux/issues/1112</a>
|
||||
|
||||
|
||||
### Untested on other platforms
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
~~As of yet untested, needs work~~
|
||||
|
||||
Reference in New Issue
Block a user