Class: Fluent::Plugin::SystemdInput
- Inherits:
-
Input
- Object
- Input
- Fluent::Plugin::SystemdInput
- Defined in:
- lib/fluent/plugin/in_systemd.rb,
lib/fluent/plugin/systemd/pos_writer.rb
Overview
rubocop:disable Metrics/ClassLength
Defined Under Namespace
Classes: PosWriter
Constant Summary collapse
- DEFAULT_STORAGE_TYPE =
"local"
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fluent/plugin/in_systemd.rb', line 37 def configure(conf) super @journal = nil @pos_storage = PosWriter.new(@pos_file, storage_create(usage: "positions")) # legacy strip_underscores backwards compatibility (legacy takes # precedence and is mutually exclusive with the entry block) mut_opts = @strip_underscores ? { fields_strip_underscores: true } : @entry_opts.to_h @mutator = SystemdEntryMutator.new(**mut_opts) if @mutator.field_map_strict && @mutator.field_map.empty? log.warn("`field_map_strict` set to true with empty `field_map`, expect no fields") end end |
#shutdown ⇒ Object
56 57 58 59 |
# File 'lib/fluent/plugin/in_systemd.rb', line 56 def shutdown @pos_storage.shutdown super end |
#start ⇒ Object
50 51 52 53 54 |
# File 'lib/fluent/plugin/in_systemd.rb', line 50 def start super @pos_storage.start timer_execute(:in_systemd_emit_worker, 1, &method(:run)) end |