Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor README improvements #116

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Airseeker can be configured via a combination of [environment variables](#enviro

### Environment variables

All of the environment variables are optional and or set with default values for convenience.

For example:

```sh
Expand All @@ -48,30 +50,36 @@ LOG_FORMAT=json
LOG_LEVEL=info
```

#### `LOGGER_ENABLED`
#### `LOGGER_ENABLED` _(optional)_

Enables or disables logging. Options:

- `true` - Enables logging.
- `false` - Disables logging.

#### `LOG_FORMAT`
Default: `true`.

#### `LOG_FORMAT` _(optional)_

The format of the log output. Options:

- `json` - Specifies JSON log format. This is suitable when running in production and streaming logs to other services.
- `pretty` - Logs are formatted in a human-friendly "pretty" way. Ideal, when running the service locally and in
development.

#### `LOG_COLORIZE`
Default: `json`.

#### `LOG_COLORIZE` _(optional)_

Enables or disables colors in the log output. Options:

- `true` - Enables colors in the log output. The output has special color setting characters that are parseable by CLI.
Recommended when running locally and in development.
- `false` - Disables colors in the log output. Recommended for production.

#### `LOG_LEVEL`
Default: `false`.

#### `LOG_LEVEL` _(optional)_

Defines the minimum level of logs. Logs with smaller level (severity) will be silenced. Options:

Expand All @@ -80,6 +88,8 @@ Defines the minimum level of logs. Logs with smaller level (severity) will be si
- `warn` - Enables logs with level `warn` and `error`.
- `error` - Enables logs with level `error`.

Default: `info`.

### Configuration files

Airseeker needs two configuration files, `airseeker.json` and `secrets.env`. All expressions of a form `${SECRET_NAME}`
Expand Down
3 changes: 1 addition & 2 deletions src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ export const chainsSchema = z
export const deviationThresholdCoefficientSchema = z
.number()
.positive()
.optional() // Explicitly agreed to make this optional. See: https://github.com/api3dao/airseeker-v2/pull/20#issuecomment-1750856113.
.default(1)
.default(1) // Explicitly agreed to make this optional. See: https://github.com/api3dao/airseeker-v2/pull/20#issuecomment-1750856113.
.superRefine((coefficient, ctx) => {
// Check if the number has a maximum of two decimals
const decimalCount = coefficient.toString().split('.')[1]?.length;
Expand Down