[Rails] Re: Silence logging altogether for certain actions?

2009-04-16 Thread Nate Wiger

Any ideas?

On Apr 15, 5:57 pm, Nate Wiger  wrote:
> Hi, I am looking for a way tosilencelogging altogether for certain
> actions.  Our app talks to other servers and session components, and
> our logs get filled up with this nonsense, even in Production mode.  I
> want to completelysilenceall the automatic logging by Rails of the
> basic request parts: method, params, etc.
>
> I've seen logger.silence, but that doesn't appear to get rid of the
> basic request chatter.  Any ideas?
>
> Processing ServersController#register to xml (for 127.0.0.1 at
> 2009-04-15 20:52:17) [POST]
>   Parameters: {"server"=>{"uname_node_name"=>"domU",
> "server_type"=>"FLS", "management_port"=>"11054",
> "service_address"=>"1.2.3.4", "uname_version"=>"#2 SMP Tue Feb 19
> 10:51:53 EST 2008", "service_port"=>"10054",
> "management_address"=>"1.2.3.4", "uname_sysname"=>"Linux",
> "max_clients"=>"2000", "current_clients"=>"2",
> "instance_uuid"=>"5b7a3804", "server_version"=>"2.1.1/edge (r
> 2009-04-01 11:13:21) [i686-linux]", "uname_domain_name"=>"(none)",
> "uname_release"=>"2.6.18-xenU-ec2-v1.0", "uname_machine"=>"i686"},
> "server_stats"=>{"cpu_sys"=>"0.00", "cpu_nice"=>"0.00",
> "cpu_idle"=>"0.00", "cpu_user"=>"0.00"}}
> Rendering servers/register
> Completed in 79ms (View: 1, DB: 4) | 200 OK [https://
> ec2.compute-1.amazonaws.com/servers/register.xml]
>
> Processing SessionsController#ping to xml (for 127.0.0.1 at 2009-04-15
> 20:52:39) [POST]
> Completed in 16ms (View: 0, DB: 2) | 200 OK [https://
> ec2.compute-1.amazonaws.com/session/ping.xml]
>
> Processing SessionsController#ping to xml (for 127.0.0.1 at 2009-04-15
> 20:52:41) [POST]
> Completed in 6ms (View: 0, DB: 2) | 200 OK [https://
> ec2.compute-1.amazonaws.com/session/ping.xml]
>
> Processing ServersController#register to xml (for 127.0.0.1 at
> 2009-04-15 20:52:47) [POST]
>   Parameters: {"server"=>{"uname_node_name"=>"domU",
> "server_type"=>"FLS", "management_port"=>"11054",
> "service_address"=>"1.2.3.4", "uname_version"=>"#2 SMP Tue Feb 19
> 10:51:53 EST 2008", "service_port"=>"10054",
> "management_address"=>"1.2.3.4", "uname_sysname"=>"Linux",
> "max_clients"=>"2000", "current_clients"=>"2",
> "instance_uuid"=>"5b7a3804", "server_version"=>"2.1.1/edge (r
> 2009-04-01 11:13:21) [i686-linux]", "uname_domain_name"=>"(none)",
> "uname_release"=>"2.6.18-xenU-ec2-v1.0", "uname_machine"=>"i686"},
> "server_stats"=>{"cpu_sys"=>"0.00", "cpu_nice"=>"0.00",
> "cpu_idle"=>"0.00", "cpu_user"=>"0.00"}}
> Rendering servers/register
> Completed in 38ms (View: 1, DB: 24) | 200 OK [https://
> ec2.compute-1.amazonaws.com/servers/register.xml]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Silence logging altogether for certain actions?

2009-04-15 Thread Nate Wiger

Hi, I am looking for a way to silence logging altogether for certain
actions.  Our app talks to other servers and session components, and
our logs get filled up with this nonsense, even in Production mode.  I
want to completely silence all the automatic logging by Rails of the
basic request parts: method, params, etc.

I've seen logger.silence, but that doesn't appear to get rid of the
basic request chatter.  Any ideas?

Processing ServersController#register to xml (for 127.0.0.1 at
2009-04-15 20:52:17) [POST]
  Parameters: {"server"=>{"uname_node_name"=>"domU",
"server_type"=>"FLS", "management_port"=>"11054",
"service_address"=>"1.2.3.4", "uname_version"=>"#2 SMP Tue Feb 19
10:51:53 EST 2008", "service_port"=>"10054",
"management_address"=>"1.2.3.4", "uname_sysname"=>"Linux",
"max_clients"=>"2000", "current_clients"=>"2",
"instance_uuid"=>"5b7a3804", "server_version"=>"2.1.1/edge (r
2009-04-01 11:13:21) [i686-linux]", "uname_domain_name"=>"(none)",
"uname_release"=>"2.6.18-xenU-ec2-v1.0", "uname_machine"=>"i686"},
"server_stats"=>{"cpu_sys"=>"0.00", "cpu_nice"=>"0.00",
"cpu_idle"=>"0.00", "cpu_user"=>"0.00"}}
Rendering servers/register
Completed in 79ms (View: 1, DB: 4) | 200 OK [https://
ec2.compute-1.amazonaws.com/servers/register.xml]


Processing SessionsController#ping to xml (for 127.0.0.1 at 2009-04-15
20:52:39) [POST]
Completed in 16ms (View: 0, DB: 2) | 200 OK [https://
ec2.compute-1.amazonaws.com/session/ping.xml]


Processing SessionsController#ping to xml (for 127.0.0.1 at 2009-04-15
20:52:41) [POST]
Completed in 6ms (View: 0, DB: 2) | 200 OK [https://
ec2.compute-1.amazonaws.com/session/ping.xml]


Processing ServersController#register to xml (for 127.0.0.1 at
2009-04-15 20:52:47) [POST]
  Parameters: {"server"=>{"uname_node_name"=>"domU",
"server_type"=>"FLS", "management_port"=>"11054",
"service_address"=>"1.2.3.4", "uname_version"=>"#2 SMP Tue Feb 19
10:51:53 EST 2008", "service_port"=>"10054",
"management_address"=>"1.2.3.4", "uname_sysname"=>"Linux",
"max_clients"=>"2000", "current_clients"=>"2",
"instance_uuid"=>"5b7a3804", "server_version"=>"2.1.1/edge (r
2009-04-01 11:13:21) [i686-linux]", "uname_domain_name"=>"(none)",
"uname_release"=>"2.6.18-xenU-ec2-v1.0", "uname_machine"=>"i686"},
"server_stats"=>{"cpu_sys"=>"0.00", "cpu_nice"=>"0.00",
"cpu_idle"=>"0.00", "cpu_user"=>"0.00"}}
Rendering servers/register
Completed in 38ms (View: 1, DB: 24) | 200 OK [https://
ec2.compute-1.amazonaws.com/servers/register.xml]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Version of SqlSessionStore for Rails 2.3

2009-03-18 Thread Nate Wiger

If you're using SqlSessionStore (originally from Stefan Kaes of
railsexpress.de) and upgrade to Rails 2.3, it will break.

I have a github version that I have updated for Rails 2.3, and also
added a new "native columns" feature to.  It is available here:
http://github.com/nateware/sql_session_store/tree/master

It is backwards-compatible with Rails 2.2 and earlier, so you should
be able to update your application (probably worth backing up the old
one just in case).

Nate Wiger
PlayStation

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Disabling XML character escaping for to_xml

2008-10-14 Thread Nate Wiger

Currently, it appears to_xml will automatically escape any entities
into their corresponding &XXX representation.  There's a piece in the
documentation that says "If $KCODE is set to u and encoding set to
UTF8, then escaping will NOT be performed."

Unfortunately, this doesn't appear to be the case.  Even after
following the docs and ensuring that default_charset is indeed UTF-8
(actually the default for Rails nowadays), we still get encoded
characters in to_xml output.

Since our client is UTF-8 aware, we need to pass thru the UTF-8 data
intact. The only way we've found to do this is thru the following
horrible monkey-patch:

module Builder
  class XmlBase
def _escape(text)
  text
end
  end
end

What's the proper way to do this?

Thanks,
Nate

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---