Skip to content

Commit 1e957ab

Browse files
committed
Add usage example to README
1 parent 9137c96 commit 1e957ab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ from Rust. You need only initialise Autput, and all the relevant panic handling
2020
and printing features are turned on for you automatically, so you can get to
2121
work right away.
2222

23+
```Rust
24+
fn main() {
25+
autput::connect();
26+
info!("This is an info message.");
27+
warn!("This is a warning message.");
28+
error!("This is an error message.");
29+
panic!("This is a panic.");
30+
}
31+
```
32+
2333
- Compatible with the `log` crate
2434
- Send to `print()`, `warn()` (Roblox only), or your own Luau log functions
2535
- Rust panics are redirected to Luau's `error()`

0 commit comments

Comments
 (0)