2017-03-30 20:44:51 +00:00
|
|
|
# Except for the secret key, none of these are actually needed; Rocket has sane
|
2016-10-04 02:21:21 +00:00
|
|
|
# defaults. We show all of them here explicitly for demonstrative purposes.
|
2016-10-03 10:39:56 +00:00
|
|
|
|
2021-04-08 02:01:48 +00:00
|
|
|
[default.limits]
|
2020-09-03 05:41:31 +00:00
|
|
|
forms = "64 kB"
|
|
|
|
json = "1 MiB"
|
|
|
|
msgpack = "2 MiB"
|
2021-03-15 09:43:01 +00:00
|
|
|
"file/jpg" = "5 MiB"
|
2017-04-18 07:25:13 +00:00
|
|
|
|
2021-04-08 02:01:48 +00:00
|
|
|
[default]
|
|
|
|
key = "a default app-key"
|
|
|
|
extra = false
|
2021-06-09 06:00:36 +00:00
|
|
|
ident = "Rocket"
|
2023-03-20 19:57:21 +00:00
|
|
|
ip_header = "CF-Connecting-IP"
|
2021-04-08 02:01:48 +00:00
|
|
|
|
2020-09-03 05:41:31 +00:00
|
|
|
[debug]
|
|
|
|
address = "127.0.0.1"
|
2016-10-03 10:39:56 +00:00
|
|
|
port = 8000
|
2017-01-12 10:38:14 +00:00
|
|
|
workers = 1
|
2020-09-03 05:41:31 +00:00
|
|
|
keep_alive = 0
|
2024-05-03 02:12:25 +00:00
|
|
|
log_level = "info"
|
Finalize 'tracing' migration.
This commit complete the migration to 'tracing' for all logging. Below
is a summary of all relevant commits, including this one:
Log improvements:
- All log (trace) messages are structured which means they contain fields
that can formatted by any subscriber.
- Logging can be disabled entirely by disabling the default `trace` feature.
- Routes and catchers now contain location (file/line) information.
- Two log format kinds: pretty and compact via ROCKET_LOG_FORMAT
- Coloring is not disabled globally. Thus applications can color even if
Rocket is configured not to.
- Rocket is more conservative about 'warn' and 'error' messages, reserving
those log levels for messages useful in production.
- Errors from guards logged by codegen now use the 'Display' implementation of
those errors when one exists.
- Secrets are never logged, even when directly asked for.
New features:
- Many Rocket types know how to trace themselves via a new `Trace` trait.
- `Either` types can now be used in `uri!()` calls.
- A `RequestIdLayer` tags all requests with a unique ID.
Breaking changes to configuration:
- `Config::log_level` is of type `Option<Level>`. `None` disables tracing.
- `log_level` now uses the traditional log level names: "off", "error",
"warn", "info", "debug", "trace", or 0-5. This replace the Rocket-specific
"normal", "debug", "critical".
- A new option, `log_format`, which is either `compact` or `pretty`,
determines how Rocket's tracing subscriber log trace messages.
Breaking changes:
- Hidden `rocket::Either` is now publicly available at `rocket::either::Either`.
- `rocket::Error` no longer panics when dropped.
- `main` generated by `#[launch]` returns an `ExitCode`.
- `FromParam` `Err` now always returns the actual error as opposed to the
string that failed to parse. To recover the original string, use `Either<T,
&str>`, where `T: FromParam`, as a parameter guard.
- Many types that implemented `Display` now instead implement `Trace`.
- `Error::pretty_print()` was removed. Use `Error::trace()` via `Trace` impl.
Internal improvements:
- Made more space in CI machines for tasks.
- Cleaned up testbench code using `inventory`.
Resolves #21.
2024-05-17 03:23:26 +00:00
|
|
|
log_format = "pretty"
|
2016-10-03 10:39:56 +00:00
|
|
|
|
2020-09-03 05:41:31 +00:00
|
|
|
[release]
|
|
|
|
address = "127.0.0.1"
|
2017-10-05 19:59:06 +00:00
|
|
|
port = 8000
|
2017-01-12 10:38:14 +00:00
|
|
|
workers = 12
|
2018-02-17 12:06:05 +00:00
|
|
|
keep_alive = 5
|
2024-05-03 02:12:25 +00:00
|
|
|
log_level = "error"
|
Finalize 'tracing' migration.
This commit complete the migration to 'tracing' for all logging. Below
is a summary of all relevant commits, including this one:
Log improvements:
- All log (trace) messages are structured which means they contain fields
that can formatted by any subscriber.
- Logging can be disabled entirely by disabling the default `trace` feature.
- Routes and catchers now contain location (file/line) information.
- Two log format kinds: pretty and compact via ROCKET_LOG_FORMAT
- Coloring is not disabled globally. Thus applications can color even if
Rocket is configured not to.
- Rocket is more conservative about 'warn' and 'error' messages, reserving
those log levels for messages useful in production.
- Errors from guards logged by codegen now use the 'Display' implementation of
those errors when one exists.
- Secrets are never logged, even when directly asked for.
New features:
- Many Rocket types know how to trace themselves via a new `Trace` trait.
- `Either` types can now be used in `uri!()` calls.
- A `RequestIdLayer` tags all requests with a unique ID.
Breaking changes to configuration:
- `Config::log_level` is of type `Option<Level>`. `None` disables tracing.
- `log_level` now uses the traditional log level names: "off", "error",
"warn", "info", "debug", "trace", or 0-5. This replace the Rocket-specific
"normal", "debug", "critical".
- A new option, `log_format`, which is either `compact` or `pretty`,
determines how Rocket's tracing subscriber log trace messages.
Breaking changes:
- Hidden `rocket::Either` is now publicly available at `rocket::either::Either`.
- `rocket::Error` no longer panics when dropped.
- `main` generated by `#[launch]` returns an `ExitCode`.
- `FromParam` `Err` now always returns the actual error as opposed to the
string that failed to parse. To recover the original string, use `Either<T,
&str>`, where `T: FromParam`, as a parameter guard.
- Many types that implemented `Display` now instead implement `Trace`.
- `Error::pretty_print()` was removed. Use `Error::trace()` via `Trace` impl.
Internal improvements:
- Made more space in CI machines for tasks.
- Cleaned up testbench code using `inventory`.
Resolves #21.
2024-05-17 03:23:26 +00:00
|
|
|
log_format = "compact"
|
2023-03-23 18:37:23 +00:00
|
|
|
# NOTE: Don't (!) use this key! Generate your own and keep it private!
|
|
|
|
# e.g. via `head -c64 /dev/urandom | base64`
|
2017-03-30 20:44:51 +00:00
|
|
|
secret_key = "hPRYyVRiMyxpw5sBB1XeCMN1kFsDCqKvBi2QJxBVHQk="
|
2021-04-08 02:01:48 +00:00
|
|
|
key = "a release app-key"
|
|
|
|
extra = false
|