From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This test case tests that thermostat logging to a file works. |setup= # Boot into the machine/VM you wish to test. # If thermostat is not installed...") |
No edit summary |
||
Line 5: | Line 5: | ||
# If thermostat is not installed yet, install thermostat. | # If thermostat is not installed yet, install thermostat. | ||
|actions= | |actions= | ||
# | # Copy a logging.properties file from the system config directory: {{command|cp /etc/thermostat/logging.properties ~/.thermostat}} | ||
# Create the logs directory where the log will be put: {{command|mkdir ~/.thermostat/logs}} | |||
# Configure a file handler in this copied file. The file should look like this: <pre> | |||
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 | |||
</pre> | |||
# Start thermostat storage: {{command| thermostat storage --start}} | |||
|results= | |results= | ||
# | # A file ~/.thermostat/logs/thermostat.log should have been created and logging messages up to level FINEST should show up in the log. | ||
# Note that this config will make sure that you get finest log messages for all of the following tests. | |||
}} | }} |
Revision as of 11:45, 22 May 2013
Description
This test case tests that thermostat logging to a file works.
Setup
- Boot into the machine/VM you wish to test.
- If thermostat is not installed yet, install thermostat.
How to test
- Copy a logging.properties file from the system config directory:
cp /etc/thermostat/logging.properties ~/.thermostat
- Create the logs directory where the log will be put:
mkdir ~/.thermostat/logs
- 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
- Start thermostat storage:
thermostat storage --start
Expected Results
- A file ~/.thermostat/logs/thermostat.log should have been created and logging messages up to level FINEST should show up in the log.
- Note that this config will make sure that you get finest log messages for all of the following tests.