4 releases

0.1.4 Jun 17, 2022
0.1.3 Feb 21, 2022
0.1.2 Feb 20, 2022
0.1.1 Feb 20, 2022

#2481 in Parser implementations

Custom license

21KB
459 lines

CEF to HashMap

macOS Linux Arm7 Linux x86_64 Windows

Convert a syslog CEF string or a regular CEF string to a HashMap object.

Requirements

  • Rust 1.56+ (2021 edition)

Example Usage

[dependencies]
cef2hashmap = "0.1.3"

and then

use cef2hashmap::CefToHashMap;

fn main() {
    let example = "<134>2022-02-14T03:17:30-08:00 TEST CEF:0|Vendor|Product|20.0.560|600|User Signed In|3|src=127.0.0.1 suser=Admin target=Admin msg=User signed in from 127.0.0.1 Tenant=Primary TenantId=0 act= cs1Label=Testing Label 1 Key cs1=Testing Label 1 String Value";
    println!("{:#?}", example.to_hashmap(true));
}
  • pass false to .to_hashmap(false) if you don't want to preserve the original event

License: MIT

No runtime deps