Friday, June 20, 2014

Adding CBC radio into foobar2000

open foobar2000,from menu file --> add Location.
put following into the address:
http://playerservices.streamtheworld.com/pls/CBC_R1_TOR_H.pls

Tuesday, June 17, 2014

JBOSS WEB ACCESS LOG CONFIG

in Jboss server folder /deploy/jbossweb.sar,file server.xml

find tag valve with following attributes

classname="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.log.dir}"
filedateformat="yyyy-MM-dd"
pattern="%{rl_client_ip}i %h %l %u %t "%r" %s %b %D"
prefix="${jboss.server.name}_access."
resolvehosts="false"
suffix=".log" valve

pattern is explained as following:

  • %a - Remote IP address
  • %A - Local IP address
  • %b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
  • %B - Bytes sent, excluding HTTP headers
  • %h - Remote host name
  • %H - Request protocol
  • %l - Remote logical username from identd (always returns '-')
  • %m - Request method
  • %p - Local port
  • %q - Query string (prepended with a '?' if it exists, otherwise an empty string
  • %r - First line of the request
  • %s - HTTP status code of the response
  • %S - User session ID
  • %t - Date and time, in Common Log Format format
  • %u - Remote user that was authenticated
  • %U - Requested URL path
  • %v - Local server name
  • %D - Time taken to process the request, in millis
  • %T - Time taken to process the request, in seconds
  • %I - current Request thread name (can compare later with stacktraces)
In addition, the caller can specify one of the following aliases for commonly utilized patterns:
  • common - %h %l %u %t "%r" %s %b
  • combined - %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"
There is also support to write information from the cookie, incoming header, the Session or something else in the ServletRequest.
It is modeled after the apache syntax:
  • %{xxx}i for incoming headers
  • %{xxx}o for outgoing response headers
  • %{xxx}c for a specific cookie
  • %{xxx}r xxx is an attribute in the ServletRequest
  • %{xxx}s xxx is an attribute in the HttpSession