aboutsummaryrefslogtreecommitdiff
path: root/ops/src/lib.rs
diff options
context:
space:
mode:
authorTill Höppner2016-03-16 15:14:03 +0100
committerTill Höppner2016-03-16 15:14:03 +0100
commit586461676df9abd2e011fbcb1bb7c784cdb2844c (patch)
tree6c66fa86c9cb9876757b099d7460ff17c39195a5 /ops/src/lib.rs
parent363e3722256c8e91bbd78bfcb2b1d3ffc83d9c0a (diff)
downloadilc-586461676df9abd2e011fbcb1bb7c784cdb2844c.tar.gz
ilc-586461676df9abd2e011fbcb1bb7c784cdb2844c.tar.xz
ilc-586461676df9abd2e011fbcb1bb7c784cdb2844c.zip
Add filtering functionality
Diffstat (limited to 'ops/src/lib.rs')
-rw-r--r--ops/src/lib.rs23
1 files changed, 2 insertions, 21 deletions
diff --git a/ops/src/lib.rs b/ops/src/lib.rs
index 2ebe51f..6fd4cab 100644
--- a/ops/src/lib.rs
+++ b/ops/src/lib.rs
@@ -5,9 +5,11 @@ extern crate bit_set;
extern crate serde;
extern crate chrono;
extern crate ilc_base;
+extern crate regex;
mod ageset;
pub mod stats;
+pub mod convert;
/// No-op log parsing
pub mod parse {
@@ -27,27 +29,6 @@ pub mod parse {
}
}
-/// Log format conversion
-pub mod convert {
- use ilc_base::{self, Context, Decode, Encode};
- use std::io::{BufRead, Write};
-
- /// Convert from one format to another, not necessarily different, format. In combination with a
- /// timezone offset, this can be used to correct the timestamps.
- /// Will return `Err` and abort conversion if the decoder yields `Err` or re-encoding fails.
- pub fn convert(ctx: &Context,
- input: &mut BufRead,
- decoder: &mut Decode,
- output: &mut Write,
- encoder: &Encode)
- -> ilc_base::Result<()> {
- for e in decoder.decode(&ctx, input) {
- try!(encoder.encode(&ctx, output, &try!(e)));
- }
- Ok(())
- }
-}
-
/// Last-seen of nicks
pub mod seen {
use ilc_base::{self, Context, Decode, Encode, Event};