| 1 | /* __copyright_begin__ |
| 2 | Copyright 2011 Dan Hagberg |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | __copyright_end__ */ |
| 16 | package net.digitaltsunami.tmeter; |
| 17 | |
| 18 | /** |
| 19 | * Used to indicate to {@link Timer} what processing should be completed upon |
| 20 | * the timer being stopped. |
| 21 | * |
| 22 | * @author dhagberg |
| 23 | * |
| 24 | */ |
| 25 | public enum TimerLogType { |
| 26 | /** |
| 27 | * Do not log |
| 28 | */ |
| 29 | NONE, |
| 30 | /** |
| 31 | * Log in readable text format |
| 32 | */ |
| 33 | TEXT, |
| 34 | /** |
| 35 | * Log as comma separated values. |
| 36 | */ |
| 37 | CSV; |
| 38 | |
| 39 | public boolean isLoggingEnabled() { |
| 40 | return this == TEXT || this == CSV; |
| 41 | } |
| 42 | } |