Project

General

Profile

« Previous | Next » 

Revision 2096

Added by Matt Jones about 20 years ago

Added classes for basic event logging support. These classes write log entries to the database connection. Still to do: query the event log, write oracle sql code (postgres is done), possibly allow the log to be archived to a text file, and possibly do the dtabase writes asynchronously via a caching mechanism.

View differences:

xmltables_postgres.sql
29 29
DROP SEQUENCE xml_replication_id_seq;
30 30
DROP SEQUENCE xml_documents_id_seq;
31 31
DROP SEQUENCE accession_number_id_seq;
32
DROP SEQUENCE access_log_id_seq;
32 33

  
33 34
DROP TABLE xml_index;
34 35
DROP TABLE xml_access;
......
40 41
DROP TABLE xml_replication;
41 42
DROP TABLE xml_catalog;
42 43
DROP TABLE accession_number;
44
DROP TABLE access_log;
43 45

  
44 46
/*
45 47
 *Replication -- table to store servers that metacat is replicated to
......
256 258
		FOREIGN KEY (docid) REFERENCES xml_documents
257 259
);
258 260

  
261
/*
262
 *Logging -- table to store metadata and data access log
263
 */
264
CREATE SEQUENCE access_log_id_seq;
265
CREATE TABLE access_log (
266
  entryid       INT8 default nextval ('access_log_id_seq'),
267
  ip_address    VARCHAR(512),
268
  principal     VARCHAR(512),
269
  docid         VARCHAR(250),	-- the document id #
270
  rev           INT8,           -- the revision number
271
  event         VARCHAR(512),
272
  date_logged   TIMESTAMP,
273
  CONSTRAINT access_log_pk PRIMARY KEY (entryid)
274
);

Also available in: Unified diff