GithubHelp home page GithubHelp logo

axodotdev / axocli Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 0.0 141 KB

๐Ÿšƒ lib for CLI utilities, printing, and error handling

License: Apache License 2.0

Rust 100.00%
builder cli error-handling utils

axocli's People

Contributors

ashleygwilliams avatar gankra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

axocli's Issues

tokio runtime setup

oranda wants this, and i'm sure we'll have other apps that use tokio that want to share the logic

The entered runtime could be passed as part of CliApp, this was factored into the design.

log files

oranda needs this

orogene has a super complicated/robust solution:

https://github.com/orogene/orogene/blob/main/src/lib.rs#L145-L255 and https://github.com/orogene/orogene/blob/main/src/lib.rs#L295-L306 set up logging, and also automatically always logging to a log file in the cache, then if there's an error, it says "here's where the log file is, if you want it. It also keeps the most recent 5 logs for you in case you wanna go back and see.

oh and it also has all the stuff you need so you can provide the really fancy EnvFilter strings to --loglevel, instead of just warn/info/etc (--loglevel node_maintainer=trace,warn)

testing mode

Right now I don't think the the design is well-suited for tests.

For global init in tests it's typical to have a global lazy_static that all tests try to use, ensuring global setup happens once. However we currently make setup and running a single transactional operation. Ideally we could have an alternate way of starting things that lets each test share global init that can be shared AND let each have their own "sandbox". Like it would be great if you could ask for logs that were generated by test1 without test2 messing with it.

idk how much of a pipe dream the full sandboxing stuff is, but at very least we want to be able to get the primary output/error of each test individually.

prettier backtraces

We do some custom backtrace stuff in our panic hook (the relevant details being in panic.rs) and I don't really like the current output. It's very noisy, especially with printing the address of a frame even if we symbolicated it. That said I need to test it out in "production" environments where symbols are worse (no local debuginfo sitting in target/) to figure out what can be trimmed or not.

The situation isn't 1:1 (not using the backtrace crate) but minidump_processor has much prettier output with this more complex impl: https://github.com/rust-minidump/rust-minidump/blob/main/minidump-processor/src/process_state.rs#L737

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.