Skip to content

Instantly share code, notes, and snippets.

@afurmanov
Created October 14, 2010 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afurmanov/625924 to your computer and use it in GitHub Desktop.
Save afurmanov/625924 to your computer and use it in GitHub Desktop.

I've recently noticed I have no new data in my web_log table, after some short investigation I figured couple things:

  1. I have no web_log table anymore
  2. 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)
@schapirama
Copy link

logworm_client is the old gem. Please, try require'ing 'logworm_amqp' (0.9.8 is indeed the last version)

Thanks,

  • A

@afurmanov
Copy link
Author

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.

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