Skip to content

Commit

Permalink
Minor README improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Nov 25, 2023
1 parent 29b740b commit 0b6c19c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
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

0 comments on commit 0b6c19c

Please sign in to comment.