3
# For python folks: show me the equivalent code for this
7
print " title = \"Syslog picviz analysis\";\n";
11
print " timeline t [label=\"Time\"];\n"; # Time
12
print " string m [label=\"Machine\"];\n"; # Machine
13
print " string a [label=\"Application\"];\n"; # Application
14
print " string l [label=\"Log\"];\n"; # Log
22
$line =~ s/\"/\\"/g; # We escape our quotes
23
$line =~ s/&//g; # We escape our quotes
24
$line =~ s/<//g; # We escape our quotes
25
$line =~ s/>//g; # We escape our quotes
26
$line =~ m/\w+ ?\d+ (\d+:\d+):\d+ ([\w-.]+) (\S+) (.*)/;
33
if ($l =~ m/.*[sS]eg.*[fF]ault.*/) {
34
print " t=\"$t\",m=\"$m\",a=\"$a\",l=\"$l\" [color=\"red\"];\n";
36
print " t=\"$t\",m=\"$m\",a=\"$a\",l=\"$l\";\n";