Enabled returns true if one of the provided tracing categories is enabled
(categories ...Trace)
| 79 | |
| 80 | // Enabled returns true if one of the provided tracing categories is enabled |
| 81 | func (t Trace) Enabled(categories ...Trace) bool { |
| 82 | for _, c := range categories { |
| 83 | if t&c == c { |
| 84 | return true |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return false |
| 89 | } |
| 90 | |
| 91 | // String returns a comma separated list of enabled categories |
| 92 | func (t Trace) String() string { |