mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
- add logging
This commit is contained in:
parent
64c072be20
commit
7e9bedea32
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,9 @@ require "socket" # for Socket.gethostname
|
||||||
|
|
||||||
class LogStash::Inputs::File
|
class LogStash::Inputs::File
|
||||||
def initialize(url, config={}, &block)
|
def initialize(url, config={}, &block)
|
||||||
|
@logger = Logger.new(STDERR)
|
||||||
|
@logger.level = $DEBUG ? Logger::WARN : Logger::DEBUG
|
||||||
|
|
||||||
@url = url
|
@url = url
|
||||||
@url = URI.parse(url) if url.is_a? String
|
@url = URI.parse(url) if url.is_a? String
|
||||||
|
|
||||||
|
@ -28,6 +31,7 @@ class LogStash::Inputs::File
|
||||||
# tag this input
|
# tag this input
|
||||||
public
|
public
|
||||||
def tag(newtag)
|
def tag(newtag)
|
||||||
|
@logger.debug("Adding tag #{newtag} to #{@url}")
|
||||||
@tags << newtag
|
@tags << newtag
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue