I've recently noticed I have no new data in my web_log table, after some short investigation I figured couple things:
- I have no web_log table anymore
- I cannot write anything into log.
Here is a very simple script demonstrating problem:
require 'rubygems'
require 'logworm_client'
begin
db = Logworm::Logger.use_default_db
puts "requesting tables..."
db.tables
puts "trying to log something into 'web_log'..."
Logworm::Logger.log('web_log', { :message => "test"})
Logworm::Logger.flush
rescue Exception => e
puts "Error: #{e}"
end
Its output is:
requesting tables...
trying to log something into 'web_log'...
Error: Logworm::DatabaseException
One week ago I was able to create new entries in web_log table, not sure what has happened afterwards. Seems like problem is not in authentication - I could successfully list tables, i.e. GET request passes (even returns empty list), however when I am trying to save something the POST request returns Net::HTTPNotFound 404.
Gems in my system are:
gem list --local | grep logworm
logworm (0.7.7)
logworm_amqp (0.9.8)
logworm_client (0.7.2)
In case somebody reading this and you logs manually via Logworm::Logger, do not forget to empty logging queue by calling Logworm::Logger.start_cycle, I've been bitten by that.