How to log SQL Create,Update,Delete only?

You should look for a grep manual - grep only the lines with SQL but
not those with SELECT. Since I'm not a grep master, I'm not sure
how...

Why not just use database triggers and use a table for logging?
That way you can also execute Rails logic against the log and do something useful with it.