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

WIP: Initial Logging Reconfiguration #2674

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jacderida
Copy link
Contributor

  • a4af603 feat: ant logs to stderr

    BREAKING CHANGE: the --log-output-dest argument is removed. Logging to file is a bit strange for a
    short-lived program, so we now log to stderr. The user can redirect to file if they want to.

    Logging is off by default. It is switched on by using the verbosity argument in the standard -v
    to -vvvvv form. This increases the levels from WARN to TRACE.

    The default logging targets were changed to crates that seem a bit more relevant for using ant,
    and to remove particularly noisy crates, like ant_bootstrap. All the crates will log at the same
    level, as defined by the verbosity argument; previously the default logging targets used different
    levels for different crates, and those seemed a little arbitrary.

    The behaviour of ANT_LOG is retained, so the user can still get output for particular crates, or
    use the special all option to get trace-level logging for all crates.

  • 65a8ead chore: remove otlp feature

    This was a vestige of our attempt to use OpenSearch, so we don't need it any more.

    The opentelemetry crate references have also been removed.

  • dc60e17 feat: switch off logging by default in antnode

    Previously, antnode would log to file by default.

    Now logging will be enabled if:

    • The ANT_LOG variable has been used.
    • The --log-output-dest argument has been used.
    • The -v argument has been used.

    The verbosity argument can take different counts, e.g., -vvv, each count increasing the level of
    the logging from ERROR through to TRACE.

    The logs will go to stderr by default. If the user wants them to go to file, they can use the
    --log-output-dest argument and specify either the default data-dir or a custom path.

    This setup should be backwards compatible for anybody who has tooling setup to use
    --log-output-dest, but it will be a breaking change for users who are expecting logs to file by
    default.

  • 243a030 chore: remove the verbosity argument from antctl

    This was an argument that was implemented in a clumsy manual way that was intended to vary the
    amount of output on the node manager. We will need to provide another verbose argument on the
    local run command to control the output of the logs for local networks.

    We still need to retain the use of it, but instead of setting it via a command line argument, it
    will just be set to Normal. The node-launchpad sets it to Minimal in the places where it needs
    the text output reduced.

  • 162d66b feat: provide verbosity arg for local run cmd

    This also provides the -v mechanism for varying the logging output for the local network. The
    value that is set here is passed to each of the node processes.

    The logging output destination is to file, otherwise on the terminal you would get a blizzard of
    output from all the node processes.

BREAKING CHANGE: the `--log-output-dest` argument is removed. Logging to file is a bit strange for a
short-lived program, so we now log to stderr. The user can redirect to file if they want to.

Logging is off by default. It is switched on by using the `verbosity` argument in the standard `-v`
to `-vvvvv` form. This increases the levels from `WARN` to `TRACE`.

The default logging targets were changed to crates that seem a bit more relevant for using `ant`,
and to remove particularly noisy crates, like `ant_bootstrap`. All the crates will log at the same
level, as defined by the `verbosity` argument; previously the default logging targets used different
levels for different crates, and those seemed a little arbitrary.

The behaviour of `ANT_LOG` is retained, so the user can still get output for particular crates, or
use the special `all` option to get trace-level logging for all crates.
This was a vestige of our attempt to use OpenSearch, so we don't need it any more.

The `opentelemetry` crate references have also been removed.
Previously, `antnode` would log to file by default.

Now logging will be enabled if:

* The `ANT_LOG` variable has been used.
* The `--log-output-dest` argument has been used.
* The `-v` argument has been used.

The verbosity argument can take different counts, e.g., `-vvv`, each count increasing the level of
the logging from `ERROR` through to `TRACE`.

The logs will go to `stderr` by default. If the user wants them to go to file, they can use the
`--log-output-dest` argument and specify either the default `data-dir` or a custom path.

This setup should be backwards compatible for anybody who has tooling setup to use
`--log-output-dest`, but it will be a breaking change for users who are expecting logs to file by
default.
This was an argument that was implemented in a clumsy manual way that was intended to vary the
amount of output on the node manager. We will need to provide another `verbose` argument on the
`local run` command to control the output of the logs for local networks.

We still need to retain the use of it, but instead of setting it via a command line argument, it
will just be set to `Normal`. The `node-launchpad` sets it to `Minimal` in the places where it needs
the text output reduced.
This also provides the `-v` mechanism for varying the logging output for the local network. The
value that is set here is passed to each of the node processes.

The logging output destination is to file, otherwise on the terminal you would get a blizzard of
output from all the node processes.
@jacderida jacderida changed the title Initial Logging Reconfiguration WIP: Initial Logging Reconfiguration Jan 27, 2025
@jacderida jacderida force-pushed the feat-rework_logging branch from 162d66b to 8ff3cd6 Compare January 30, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant