Skip to content

Eye log stdout took long time to flush to file. #238

Description

@emanzx

I have notice some of my daemon that is daemonize by eye are not emitting log directly to file. is there a buffering happen and can I change that.

Here are my eye config.

require 'eye-http'

Eye.config do
  http :enable => true, :host => "127.0.0.1", :port => 12345
  logger '/var/log/dnsvault/eye/eye.log'
end

Eye.application 'services' do
  check :cpu, every: 10.seconds, below: 100, times: 3 # global check for all processes

    working_dir "/root/"
    stdall "/var/log/dnsvault/eye/trash.log" # stdout,err logs for processes by default
    env 'APP_ENV' => 'development' # global env for each processes
    trigger :flapping, times: 10, within: 1.minute, retry_in: 10.minutes
    chain grace: 10.seconds # chained start-restart with 10s interval, one by one.
    process :bindquerycollector do
       env 'HOME' => "/usr/home/system"
       working_dir "/usr/home/system/dnsvault/sbin"
       uid "system"
       gid "system"
       pid_file "/tmp/bindquerycollector.pid"
       start_command "/usr/home/system/dnsvault/sbin/bindquerycollector"
       stdall "/var/log/dnsvault/eye/bindquerycollector.log"
       stop_signals [:INT, 5.seconds, :QUIT, 2.second, :KILL]
       start_timeout 60.seconds
       daemonize true
    end
end

 eye -v
Eye v0.10.0 (c) 2012-2017 @kostya

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions