incubator-alois-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fla...@apache.org
Subject svn commit: r1042946 - /incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb
Date Tue, 07 Dec 2010 09:21:28 GMT
Author: flavio
Date: Tue Dec  7 09:21:28 2010
New Revision: 1042946

URL: http://svn.apache.org/viewvc?rev=1042946&view=rev
Log:
Added login/logiout parsing

Modified:
    incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb

Modified: incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb?rev=1042946&r1=1042945&r2=1042946&view=diff
==============================================================================
--- incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb
(original)
+++ incubator/alois/trunk/prisma/data/prisma/prisma_database/model/swissmentor_base_meta.rb
Tue Dec  7 09:21:28 2010
@@ -20,7 +20,18 @@ class SwissmentorBaseMeta < ActiveRecord
   
   def self.expressions
     ret = []
+
     # SMS: [broesel@127.0.0.1] Login successful for user broesel
+    ret.push({ :regex => /^(\S+): \[(\S*)\@(\S+)\] (Login denied for user|Login request
user|Login successful for user):? (.*)$/,
+               :fields => [:process, :client_user, :client_ip, :message],
+               :result_filter => lambda {|results, instance|                 
+                 results[1] = results[4] if results[1].blank?
+                 if results[1] != results[4]
+                   result[3] += ": #{results[4]}"
+                 end
+                 results.pop
+                 results
+               }})
 
     ret.push({ :regex => /^(\S+): \[(\S*)\@(\S+)\] (.*)$/,
                :fields => [:process, :client_user, :client_ip, :message]})



Mime
View raw message