ngiger / redmine_medelexis

A few goodies for the Medelexis MIS
GNU General Public License v2.0
1 stars 1 forks source link

change logfile destination #8

Closed col-panic closed 10 years ago

col-panic commented 10 years ago

Currently you are logging the stuff to /var/log/messages, I would like to separate this please, could you please check that I may set a different log location for all redmine_medelexis related tasks (licenses, cleanup, trial to licensed scripts ...) thanks

ngiger commented 10 years ago

lib/medelexis_helpers.rb contains the method log_to_system which could be patched easily. For ruby-logging see http://rubylearning.com/satishtalim/ruby_logging.html.

Can you answer the following question:

col-panic commented 10 years ago

I would rather prefer doing the logging using logrotate, s.t. its configurable in LInux

the logfilename is good! But how do you find about the hostname?

thanks

Niklaus Giger schrieb:

lib/medelexis_helpers.rb contains the method log_to_system which could be patched easily. For ruby-logging see http://rubylearning.com/satishtalim/ruby_logging.html.

Can you answer the following question:

  • Should ruby do a monthly/weekly/daily rotating of the logs (1 liner)?
  • How should the log file be called? I propose /var/log/.log? Meaning that when you access http://mis.example.org/more/info log entries would be placed under /var/log/mis.example.org.log

— Reply to this email directly or view it on GitHub https://github.com/ngiger/redmine_medelexis/issues/8#issuecomment-58500871.

ngiger commented 10 years ago

ruby

Socket.gethostname # returns mis hostname -f.strip # returns mis.example.org

col-panic commented 10 years ago

will not return different values for mis and mis-beta ... NameBasedResoltuion ... i thikn

Niklaus Giger schrieb:

ruby

Socket.gethostname # returns mis |hostname -f|.strip # returns mis.example.org

— Reply to this email directly or view it on GitHub https://github.com/ngiger/redmine_medelexis/issues/8#issuecomment-58504530.

ngiger commented 10 years ago

Why do you want to configure it under Linux: Ruby allows the same functionality. You just have to define your requirements: see http://www.ruby-doc.org/stdlib-2.1.3/libdoc/logger/rdoc/Logger.html

ngiger commented 10 years ago

Closed with https://github.com/ngiger/redmine_medelexis/commit/63f92245bf5985eeacd5c109eea806b92ed63f72