mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -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
|
||||
def initialize(url, config={}, &block)
|
||||
@logger = Logger.new(STDERR)
|
||||
@logger.level = $DEBUG ? Logger::WARN : Logger::DEBUG
|
||||
|
||||
@url = url
|
||||
@url = URI.parse(url) if url.is_a? String
|
||||
|
||||
|
@ -28,6 +31,7 @@ class LogStash::Inputs::File
|
|||
# tag this input
|
||||
public
|
||||
def tag(newtag)
|
||||
@logger.debug("Adding tag #{newtag} to #{@url}")
|
||||
@tags << newtag
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue