Logging Olap4ld

From www.b-kaempgen.de
Jump to: navigation, search

Info

Where to locate the logging file?

  • logging.properties may be located: For a Java program run from Eclipse directly, it may be in the folder of the project; for a running dynamic web project in Eclipse, it may be in the Eclipse Directory (e.g., /home/benedikt/Programs/eclipse_juno_jdk_20120721/); for other Tomcat occasions, it may be in the Server root which you can ask by going to Servers -> Open a server and look for server directory (or similar).
  • Session Logging: Currently, every created connection creates one log file. Problem: Since we use Xmla asynchronously, we get a log file for every call of the interface.
  • In XmlaHandler.java of xmlaserver, a sessionId can be given
  • Currently, every connection has user [null] and session [<no_session>]
  • We could create a map with connections and use the one that is requested.
  • However, how to ask for a specific session?
  • Currently, both seems not to be implemented neither in xmla4js and xmlaserver.
  • For test cases to log, we need to run Olap4ldUtil.prepareLogging();.

How to make sense of the logging file?

  • LDCX_Performance_Evaluation_LogParse_Experiments.java can parse the log files and return it as a SQLite database file (uses exrunner [1] by Günter Ladwig).
  • Watch out
    • Setup logging file to append or not append log files.
    • Set Logging Level to INFO
  • Example SQLite query for averages over querytime and queryname: sqlite3 -header /home/benedikt/Workspaces/Git-Repositories/olap4ld/OLAP4LD-trunk/testresources/bottleneck.db 'select querytime, queryname, avg(triplescount), avg(lookupscount), avg(loadvalidatedatasetstime), avg(executemetadataqueriestime), avg(generatelogicalqueryplantime), avg(generatephysicalqueryplantime), avg(executephysicalqueryplantime) from bottleneck group by queryname order by triplescount, queryname desc'

Status

Status 2013-09-28

  • Currently, we set up logging per Driver. However, the more interesting part of olap4ld are "connections" (Olap4ldConnection).
  • Possible solution:
    • Instead of simply using java.util.logging.FileHandler, java.util.logging.ConsoleHandler, I also create own handler and add the current time to it.
  • With Tomcat, this did not really work, so we also added our own log handlers.
  • NO PERFECT SOLUTION, here.

Status 2013-09-26

As described in Galileo Java Book [2], we allow configuration with an external file logging.properties.

  • logging.properties
    • We support three logging levels for Console and File handler: WARNING (only the possible error logs), INFO (monitoring usage of olap4ld), CONFIG (logging everything)
    • we log in olap4ld
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.pattern=olap4ld.log
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
  • In Java Code, we had to set the system-wide logging level to Level.ALL, so that the default level (INFO) is overridden and can be restricted by our logging.properties:
		// Setup logging
		Olap4ldUtil._log = Logger.getLogger("Olap4ldDriver");
		
		System.setProperty( "java.util.logging.config.file", "logging.properties" );


		try { LogManager.getLogManager().readConfiguration(); }
		catch ( Exception e ) { e.printStackTrace(); }
		
		Olap4ldUtil._log.setLevel(Level.ALL);