CDB is configured using the properties file called
cdb.properties
. This file is provided when you install the CDB.
Series of default values are set to allow the tool to work when you install it.
The properties file can be modified to customise it as per the requirement.
Install the CDB in epoc32\tools
, which is the default
location. The properties file will be created and defined in
epoc32\tools\cdb
.
The set of properties in the properties file looks like this:
# general tool settings, where CDB can find basic things it needs:
# cdb.env.epocroot = o:\\
# cdb.env.epoc32tree = ${cdb.env.epocroot}epoc32\\
cdb.env.cppfilt = ${cdb.env.epoc32tree}gcc\\bin\\c++filt.exe
cdb.env.cppfilt.eabi = ${cdb.env.epoc32tree}tools\\cdb\\c++filt.exe
cdb.env.debug = false
# Database Configuration
cdb.db.script = ${cdb.env.epoc32tree}tools\\cdb\\cdb.sql
cdb.db.path = ${cdb.env.epoc32tree}data\\cdb.db
cdb.db.type = HSQLDB
# Extraction Settings
cdb.extract.gxp.path = ${cdb.env.epoc32tree}release\\gccxml\\urel\\
cdb.extract.def.type = EABI
cdb.extract.classifier.plugins = ${cdb.env.epoc32tree}tools\\cdb\\plugins\\
cdb.extract.classifier.descriptor = symbianclassifier
cdb.extract.classifier.init = ${cdb.env.epoc32tree}data\\apiclassdoc.xml
cdb.extract.classifier.failonpluginerror = false
# if not set, extracted data is not classified.
# Log File Settings
cdb.log.file.enabled = false
cdb.log.file.format = %-5p [%-20.20C{1}] %-8r %4L - %m%n
cdb.log.file.path = d:\\code\\cdb\\data\\cdb.log
cdb.log.file.level = INFO
# Console Log Settings
cdb.log.console.format = %-5p %m%n
cdb.log.console.level = INFO
# Report Settings
cdb.report.stylesheet = ${cdb.env.epoc32tree}tools\\cdb\\bcstyle.xsl
cdb.report.comparepluginid = false
cdb.report.classificationtightening = true
# cdb.report.apiclass.filter.status
# cdb.report.apiclass.filter.access
#comparisons on or off
cdb.newcompare.enable = true
#support for absent keyword in DEFs
cdb.support.absentdef = true
Settings in the property file are defined in the form
<property>=<value>
. Comment lines begin with a #
(hash) character. A property can be defined in terms of another property. Take
a look at the cdb.report.stylesheet property
to see how this is
achieved. In this case, cdb.env.epoc32tree
is an internal property
that is set up at runtime to equal the path to your epoc32 folder.
The settings you will modify will change:
the location of the database
the level of the output information generated
the format of the output.
You can then check if these changes have been accepted by the tool. To
change the database location, modify the value of cdb.db.path
property relative to the epoc root. The epocroot variable can be referenced by
using the property cdb.env.epocroot
.
cdb.db.path = ${cdb.env.epocroot}databases\\cdb.db
To modify the level of output, change the value of the property cdb.log.console.level to either DEBUG, INFO, WARN, ERROR, or CRITICAL. By default, CDB provides the information to convey users what is going on. For more information, set the output level to a more verbose one – such as DEBUG.
cdb.log.console.level = DEBUG
By choosing this option, more information is dumped onto the screen leading to the risk of scrolling blindness.
The format of the output can be changed to suit the display that is being used. The patterns that are permitted are explained below (this table is taken from Log4J Javadocs):
|
Try setting the console pattern to the following value and see what happens.
cdb.log.console.pattern = %-5p [%-20.20C{1}] %-8r %4L - %m%n
This pattern will display the following:
the type of message
the class in the source code from where the message has come
the time elapsed in milliseconds since execution began that this log line was recorded
the line number of the file from which the log message has come
the actual message.
To check if the property changes have been accepted by the CDB, save the properties file. From the command prompt in the same drive as the installed copy of CDB, type the following:
cdb checkconfig