Hi there!

I am using sequel for its built-in sharding support. My configuration looks 
like
default: 
  ... # some default connection settings

users:
  <<: *default 
  database: database_shard_0
  servers:
    shard_0:
      <<: *default
      database: database_shard_0
    shard_1:
      <<: *default
      database: database_shard_1

Every query to database is logged to $stdout with standard ruby Logger.

I need to log server name (shard_0/shard_1 from configuration) within the 
query, or the name of database.
For instance, log entry looks like:

I, [2015-11-06T11:40:57.480074 #3775]  INFO -- : (0.000439s) SELECT 1 as 
"result";
While I need
I, [2015-11-06T11:40:57.480074 #3775]  INFO -- shard_0: (0.000439s) SELECT 
1 as "result";


What is the best way to achieve that?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to