# ci_group
[](https://crates.io/crates/ci_group)
[](https://docs.rs/ci_group)
[](LICENSE-MIT)
A lightweight RAII library for log groups in GitHub Actions and Azure Pipelines.
Fixes "swallowed logs" by closing groups automatically when dropped, preserving output even on panic.
## Install
```toml
[dependencies]
ci_group = "0.1"
```
## Usage
```rust
let _g = ci_group::open("Build");
build(); // group closes automatically, even on panic
```
Or use the macro:
```rust
ci_group::group!("Build", {
build()?;
});
```
## Local development
No output outside CI. To preview locally:
```bash
GITHUB_ACTIONS=true cargo run # GitHub Actions
TF_BUILD=true cargo run # Azure Pipelines
```
## Limitation
RAII cannot help if code calls `std::process::exit()` - destructors are skipped.
Return from `main()` instead.
## License
MIT OR Apache-2.0