Initial something
This commit is contained in:
commit
8cd88c761b
11 changed files with 338146 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
/target/
|
||||||
|
**/*.rs.bk
|
||||||
208
Cargo.lock
generated
Normal file
208
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,208 @@
|
||||||
|
[root]
|
||||||
|
name = "t2"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rmp-serde 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "0.6.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "byteorder"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dtoa"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "0.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazy_static"
|
||||||
|
version = "0.2.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.31"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "1.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-traits"
|
||||||
|
version = "0.1.40"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "0.3.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.4.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rmp"
|
||||||
|
version = "0.8.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rmp-serde"
|
||||||
|
version = "0.13.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rmp 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_derive_internals 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive_internals"
|
||||||
|
version = "0.16.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "0.11.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "synom"
|
||||||
|
version = "0.11.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thread_local"
|
||||||
|
version = "0.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-xid"
|
||||||
|
version = "0.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unreachable"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "utf8-ranges"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "void"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
|
||||||
|
"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d"
|
||||||
|
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
|
||||||
|
"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c"
|
||||||
|
"checksum lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9e5e58fa1a4c3b915a561a78a22ee0cac6ab97dca2504428bc1cb074375f8d5"
|
||||||
|
"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c"
|
||||||
|
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
||||||
|
"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0"
|
||||||
|
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
|
||||||
|
"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
|
||||||
|
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
|
||||||
|
"checksum rmp 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a3d45d7afc9b132b34a2479648863aa95c5c88e98b32285326a6ebadc80ec5c9"
|
||||||
|
"checksum rmp-serde 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "011e1d58446e9fa3af7cdc1fb91295b10621d3ac4cb3a85cc86385ee9ca50cd3"
|
||||||
|
"checksum serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "6a7046c9d4c6c522d10b2d098f9bebe2bef227e0e74044d8c1bfcf6b476af799"
|
||||||
|
"checksum serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1afcaae083fd1c46952a315062326bc9957f182358eb7da03b57ef1c688f7aa9"
|
||||||
|
"checksum serde_derive_internals 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd381f6d01a6616cdba8530492d453b7761b456ba974e98768a18cad2cd76f58"
|
||||||
|
"checksum serde_json 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ee28c1d94a7745259b767ca9e5b95d55bafbd3205ca3acb978cad84a6ed6bc62"
|
||||||
|
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
||||||
|
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||||
|
"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"
|
||||||
|
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
||||||
|
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
||||||
|
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
|
||||||
|
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||||
11
Cargo.toml
Normal file
11
Cargo.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "t2"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Jyri Eerola <jyri.eerola@jrd.fi>"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
regex = "0.2"
|
||||||
|
serde = "1.0"
|
||||||
|
serde_derive = "1.0"
|
||||||
|
rmp-serde = "0.13.7"
|
||||||
|
serde_json = "1.0"
|
||||||
10
Cargo.toml~
Normal file
10
Cargo.toml~
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[package]
|
||||||
|
name = "t2"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Jyri Eerola <jyri.eerola@jrd.fi>"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
regex = "0.2"
|
||||||
|
serde = "1.0"
|
||||||
|
serde_derive = "1.0"
|
||||||
|
rmp-serde = "0.13.7"
|
||||||
60
src/main.rs
Normal file
60
src/main.rs
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
extern crate serde;
|
||||||
|
extern crate rmp_serde;
|
||||||
|
extern crate regex;
|
||||||
|
extern crate serde_json;
|
||||||
|
|
||||||
|
use env;
|
||||||
|
use regex::RegexSet;
|
||||||
|
use std::io::BufRead;
|
||||||
|
use std::process::{Command,Stdio};
|
||||||
|
|
||||||
|
#[derive(Serialize, Debug)]
|
||||||
|
struct Entry {
|
||||||
|
source: u32,
|
||||||
|
level: u8,
|
||||||
|
time: u64,
|
||||||
|
event: String,
|
||||||
|
details: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let args: Vec<String> = env::args().collect();
|
||||||
|
|
||||||
|
let prog = &args[1];
|
||||||
|
let prog_args = ["biglog"];
|
||||||
|
let prog_dir = "testdata";
|
||||||
|
|
||||||
|
let child = Command::new(prog)
|
||||||
|
.args(&prog_args)
|
||||||
|
.current_dir(prog_dir)
|
||||||
|
.stdout(Stdio::piped())
|
||||||
|
.spawn()
|
||||||
|
.expect("Spawn failed");
|
||||||
|
|
||||||
|
let lineset = [r"^ "];
|
||||||
|
|
||||||
|
let regset = RegexSet::new(&lineset).unwrap();
|
||||||
|
|
||||||
|
let reader = std::io::BufReader::new(child.stdout.unwrap());
|
||||||
|
for line in reader.lines() {
|
||||||
|
let line = line.unwrap();
|
||||||
|
let matches: Vec<_> = regset.matches(&line).into_iter().collect();
|
||||||
|
match matches.len() {
|
||||||
|
0 => {
|
||||||
|
println!("UNKNOWN: {}", &line);
|
||||||
|
},
|
||||||
|
1 => {
|
||||||
|
println!("EXACT: {}", &line);
|
||||||
|
},
|
||||||
|
_ => {
|
||||||
|
print!("FAIL(");
|
||||||
|
for ri in matches {
|
||||||
|
print!("{},", ri);
|
||||||
|
}
|
||||||
|
println!("): {}", &line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
57
src/main.rs~
Normal file
57
src/main.rs~
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
extern crate serde;
|
||||||
|
extern crate rmp_serde;
|
||||||
|
extern crate regex;
|
||||||
|
extern crate serde_json;
|
||||||
|
|
||||||
|
use regex::RegexSet;
|
||||||
|
use std::io::BufRead;
|
||||||
|
use std::process::{Command,Stdio};
|
||||||
|
|
||||||
|
#[derive(Serialize, Debug)]
|
||||||
|
struct Entry {
|
||||||
|
source: u32,
|
||||||
|
level: u8,
|
||||||
|
time: u64,
|
||||||
|
event: String,
|
||||||
|
details: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let prog = "/bin/cat";
|
||||||
|
let prog_args = ["biglog"];
|
||||||
|
let prog_dir = "testdata";
|
||||||
|
|
||||||
|
let child = Command::new(prog)
|
||||||
|
.args(&prog_args)
|
||||||
|
.current_dir(prog_dir)
|
||||||
|
.stdout(Stdio::piped())
|
||||||
|
.spawn()
|
||||||
|
.expect("Spawn failed");
|
||||||
|
|
||||||
|
let lineset = [r"^ "];
|
||||||
|
|
||||||
|
let regset = RegexSet::new(&lineset).unwrap();
|
||||||
|
|
||||||
|
let reader = std::io::BufReader::new(child.stdout.unwrap());
|
||||||
|
for line in reader.lines() {
|
||||||
|
let line = line.unwrap();
|
||||||
|
let matches: Vec<_> = regset.matches(&line).into_iter().collect();
|
||||||
|
match matches.len() {
|
||||||
|
0 => {
|
||||||
|
println!("UNKNOWN: {}", &line);
|
||||||
|
},
|
||||||
|
1 => {
|
||||||
|
println!("EXACT: {}", &line);
|
||||||
|
},
|
||||||
|
_ => {
|
||||||
|
print!("FAIL(");
|
||||||
|
for ri in matches {
|
||||||
|
print!("{},", ri);
|
||||||
|
}
|
||||||
|
println!("): {}", &line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
src/mc.rs~
Normal file
21
src/mc.rs~
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) (?P<verb>\w+) the game
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: Stopping server
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) issued server command: (?P<com>.+)
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) lost connection: (?P<com>.+)
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+)\[/(?P<IPv4>\d+.\d+.\d+.\d+):(\d+)] logged in
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) has made the advancement \[(?P<advancement>[\w\s]+)\]
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <(?P<player>\w+)> (?P<message>.+)
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <\x1B\[0;31;22m~(?P<player>\w+)\x1B\[m> (?P<message>.+)
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/DEBUG\]
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/TRACE\]
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/WARN\]
|
||||||
|
^
|
||||||
|
^}
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\] \[
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/INFO\] \[
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/DEBUG\]
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/WARNING\] \[
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/DEBUG\]
|
||||||
|
^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/TRACE\]
|
||||||
|
|
||||||
|
|
||||||
25
src/sets/minecraft.rs
Normal file
25
src/sets/minecraft.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
mod minecraft {
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
let mut re_collection = HashMap::new();
|
||||||
|
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) (?P<verb>\w+) the game");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: Stopping server");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) issued server command: (?P<com>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) lost connection: (?P<com>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+)\[/(?P<IPv4>\d+.\d+.\d+.\d+):(\d+)] logged in");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) has made the advancement \[(?P<advancement>[\w\s]+)\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <(?P<player>\w+)> (?P<message>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <\x1B\[0;31;22m~(?P<player>\w+)\x1B\[m> (?P<message>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/TRACE\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/WARN\]");
|
||||||
|
re_collection.insert("", r"^ ");
|
||||||
|
re_collection.insert("", r"^}");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/INFO\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/WARNING\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/TRACE\]");
|
||||||
|
}
|
||||||
25
src/sets/minecraft.rs~
Normal file
25
src/sets/minecraft.rs~
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
let mut re_collection = HashMap::new();
|
||||||
|
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) (?P<verb>\w+) the game");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: Stopping server");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) issued server command: (?P<com>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) lost connection: (?P<com>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+)\[/(?P<IPv4>\d+.\d+.\d+.\d+):(\d+)] logged in");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) has made the advancement \[(?P<advancement>[\w\s]+)\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <(?P<player>\w+)> (?P<message>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <\x1B\[0;31;22m~(?P<player>\w+)\x1B\[m> (?P<message>.+)");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/TRACE\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/WARN\]");
|
||||||
|
re_collection.insert("", r"^ ");
|
||||||
|
re_collection.insert("", r"^}");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/INFO\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/WARNING\] \[");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/DEBUG\]");
|
||||||
|
re_collection.insert("", r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/TRACE\]");
|
||||||
|
|
||||||
|
|
||||||
337706
testdata/biglog
vendored
Normal file
337706
testdata/biglog
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
testdata/mcset.txt~
vendored
Normal file
21
testdata/mcset.txt~
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) (?P<verb>\w+) the game",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: Stopping server",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) issued server command: (?P<com>.+)",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) lost connection: (?P<com>.+)",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+)\[/(?P<IPv4>\d+.\d+.\d+.\d+):(\d+)] logged in",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\]: (?P<player>\w+) has made the advancement \[(?P<advancement>[\w\s]+)\]",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <(?P<player>\w+)> (?P<message>.+)",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/INFO\]: <\x1B\[0;31;22m~(?P<player>\w+)\x1B\[m> (?P<message>.+)",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/DEBUG\]",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/TRACE\]",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/WARN\]",
|
||||||
|
r"^ ",
|
||||||
|
r"^}",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Server thread/INFO\] \[",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/INFO\] \[",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/DEBUG\]",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[main/WARNING\] \[",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/DEBUG\]",
|
||||||
|
r"^\[(?P<time>\d\d:\d\d:\d\d)\] \[Netty Epoll Server IO #\d/TRACE\]"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue