WSO2 Gadget Server 1.3.0 is out with a bunch of awaited features

This is a short post aiming to notify the new features of WSO2 Gadget Server 1.3.0 which was released recently. The product is popular among the community as a gadget rendering platform, which provides a presentation layer for heterogeneous enterprise services based on Google Gadgets Specification and Apache Shindig. As an enterprise presentation product, the Gadget server is now fully fledged with number of awaited features such as,

And some of the important features of WSO2 Gadget Server are,

Try out The Gadget Server 1.3.0, and provide your feedback to make it better and brighter. You can provide feedback, report bugs and join in with architectural discussions at any of WSO2 public lists and also you can have a better understanding via going through many articles at WSO2 Oxygen tank.

{HowTo} WSO2 Carbon Server logs to be stored in a database

Thought of documenting this for my own reference, hope this will help. I am also planing to make a knowledge base article out of it to be posted in WSO2 Oxygen Tank.

As you may know, if your are familiar with Log4j, that the logs created with it, can be stored in a database instead of a file. In order to do that you need to add few configuration values to the file.

In-terms of a WSO2 Carbon based server this properties file resides in CARBON_HOME/lib directory. before adding these configurations there are few steps to visit.

[1] Create database {LOG_DB}
[2] Create the log table  {LOGGING} with the following fields

create table LOGGING (
             id decimal NOT NULL,
             prio varchar(15),
             cat varchar(255),
             thread varchar(30),
             msg varchar(255),
             layout_msg varchar(255),
             throwable varchar(2000),
             the_timestamp timestamp);

[3] Create a user and assign to the DB

           {user: logger / pwd: logger}

[4] Copy jdbcappender.jar to {CARBON_HOME}/lib and {CARBON_HOME}/repository/components/lib along with the database driver

           {jdbcappender.jar can be found at}

Thats it. All preconditions are set, Now open up the file and add the following appender settings to the end.

#log to db appender
log4j.appender.DB_APPENDER.sql=INSERT INTO LOGGING (id, prio, cat, thread, msg, layout_msg, throwable, 
the_timestamp) VALUES (@INC@, '@PRIO@', '@CAT@', '@THREAD@', '@MSG@', '@LAYOUT:1@', '@THROWABLE@', '@TIMESTAMP@')

Scroll to log4j.rootLogger and add the appender to the list,