mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- more packaging work
This commit is contained in:
parent
5e00e8b4d6
commit
1a3a2550ed
4 changed files with 36 additions and 16 deletions
32
Rakefile
32
Rakefile
|
@ -18,22 +18,23 @@ task :compile => "lib/logstash/config/grammar.rb" do |t|
|
|||
#
|
||||
# org/jruby/util/JavaNameMangler.java:105:in `mangleFilenameForClasspath'
|
||||
# org/jruby/util/JavaNameMangler.java:32:in `mangleFilenameForClasspath'
|
||||
#require 'jruby/jrubyc'
|
||||
require 'jruby/jrubyc'
|
||||
#args = [ "-p", "net.logstash" ]
|
||||
#args += Dir.glob("**/*.rb")
|
||||
#status = JRuby::Compiler::compile_argv(args)
|
||||
#if (status != 0)
|
||||
#puts "Compilation FAILED: #{status} error(s) encountered"
|
||||
#exit status
|
||||
#end
|
||||
args = ["-d", "build"]
|
||||
args += Dir.glob("**/*.rb")
|
||||
status = JRuby::Compiler::compile_argv(args)
|
||||
if (status != 0)
|
||||
puts "Compilation FAILED: #{status} error(s) encountered"
|
||||
exit status
|
||||
end
|
||||
|
||||
#mkdir_p "build"
|
||||
sh "rm -rf lib/net"
|
||||
Dir.chdir("lib") do
|
||||
args = Dir.glob("**/*.rb")
|
||||
#sh "jrubyc", "-d", "../build" *args
|
||||
sh "jrubyc", *args
|
||||
end
|
||||
#sh "rm -rf lib/net"
|
||||
#Dir.chdir("lib") do
|
||||
#args = Dir.glob("**/*.rb")
|
||||
##sh "jrubyc", "-d", "../build" *args
|
||||
#sh "jrubyc", *args
|
||||
#end
|
||||
end
|
||||
|
||||
VERSIONS = {
|
||||
|
@ -127,7 +128,10 @@ namespace :package do
|
|||
File.copy(file, target)
|
||||
end
|
||||
|
||||
sh "jar -cf logstash-#{LOGSTASH_VERSION}.jar -C build-jar ."
|
||||
output = "logstash-#{LOGSTASH_VERSION}.jar"
|
||||
sh "jar -cfe #{output} logstash.agent -C build-jar ."
|
||||
sh "jar -uf #{output} patterns/"
|
||||
sh "jar -i #{output}"
|
||||
end # package:monolith:jar
|
||||
end # monolith
|
||||
end # package
|
||||
|
|
|
@ -5,6 +5,18 @@ input {
|
|||
}
|
||||
}
|
||||
|
||||
filter {
|
||||
grok {
|
||||
type => "linux-syslog"
|
||||
pattern => "%{SYSLOGLINE}"
|
||||
}
|
||||
|
||||
date {
|
||||
type => "linux-syslog"
|
||||
timestamp => "MMM dd HH:mm:ss"
|
||||
timestamp8601 => ISO8601
|
||||
}
|
||||
}
|
||||
output {
|
||||
stdout {
|
||||
#debug => true
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#TODO(sissel): Maybe this will help jruby jar issues?
|
||||
#$: << File.join(File.dirname(__FILE__), "../"
|
||||
|
||||
require "logstash/filters"
|
||||
require "logstash/inputs"
|
||||
require "logstash/logging"
|
||||
|
|
|
@ -12,11 +12,11 @@ class LogStash::Filters::Grok < LogStash::Filters::Base
|
|||
config :drop_if_match, :validate => :boolean # googlecode/issue/26
|
||||
|
||||
class << self
|
||||
attr_reader :patterns_dir
|
||||
attr_accessor :patterns_dir
|
||||
end
|
||||
|
||||
self.patterns_dir = ["#{File.dirname(__FILE__)}/../../../patterns/*"]
|
||||
flag("--patterns-path PATH", "Colon-delimited path of patterns to load") do |val|
|
||||
@patterns_dir ||= ["#{File.dirname(__FILE__)}/../../../patterns/*"]
|
||||
@patterns_dir += val.split(":")
|
||||
end
|
||||
|
||||
|
@ -31,6 +31,7 @@ class LogStash::Filters::Grok < LogStash::Filters::Base
|
|||
public
|
||||
def register
|
||||
@pile = Grok::Pile.new
|
||||
@logger.info("Grok patterns paths: #{self.class.patterns_dir.inspect}")
|
||||
self.class.patterns_dir.each do |path|
|
||||
if File.directory?(path)
|
||||
path = File.join(path, "*")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue