mirror of https://github.com/TaKO8Ki/gobang
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
377 B
Rust
15 lines
377 B
Rust
3 years ago
|
#[macro_export]
|
||
|
macro_rules! outln {
|
||
|
($($expr:expr),+) => {{
|
||
|
use std::io::{Write};
|
||
|
use std::fs::OpenOptions;
|
||
|
let mut file = OpenOptions::new()
|
||
|
.write(true)
|
||
|
.create(true)
|
||
|
.append(true)
|
||
|
.open("gobang.log")
|
||
|
.unwrap();
|
||
|
writeln!(file, $($expr),+).expect("Can't write output");
|
||
|
}}
|
||
|
}
|