Grace Software
JavaLog
$Revision: 1.1 $
$Date: 1999/10/11 00:05:14 $
|
$ java -Dlog.handler.db.url=jdbc:postgresql://grace/logdb -Dlog.handler.db.username=username -Dlog.handler.db.password=password MyClass
CREATE TABLE Log ( eventtime datetime, number int, type varchar(32), thread varchar(64), class varchar(64), function varchar(64), line varchar(8), message varchar(256), object varchar(256));The events are written using an SQL statement similar to the following:
insert into Log values (time, num, type, thread, class, function, line, message, object)Notice that, by default, the SQL insert statement does not specify the column names, just the data, so the names of the columns in the user's database do not need to match those in the above scheme. However, obviously the data types must match in type.
-Dlog.handler.db.table="DifferentTable" -Dlog.handler.db.columns="time, message" -Dlog.handler.db.format="'%t', '%m'";The above properties would generate the following SQL statement:
insert into DifferentTable (time, message) values (time, message)