From Fedora Project Wiki

Description

This test case tests that thermostat logging to a file works.

Setup

  1. Boot into the machine/VM you wish to test.
  2. If thermostat is not installed yet, install thermostat.

How to test

  1. Copy a logging.properties file from the system config directory: cp /etc/thermostat/logging.properties ~/.thermostat
  2. Create the logs directory where the log will be put: mkdir ~/.thermostat/logs
  3. Configure a file handler in this copied file. The file should look like this:
com.redhat.thermostat.handlers=java.util.logging.FileHandler
java.util.logging.FileHandler.pattern = %h/.thermostat/logs/thermostat.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
com.redhat.thermostat.level=FINEST
  1. Start thermostat storage: thermostat storage --start

Expected Results

  1. A file ~/.thermostat/logs/thermostat.log should have been created and logging messages up to level FINEST should show up in the log.
  2. Note that this config will make sure that you get finest log messages for all of the following tests.