Commit 9ac441e
committed
Fix logging at level Logger::DEBUG
Previously setting the log level to Logger::DEBUG would have no effect
as the log level of the Logger object was not changed.
If you set:
InfluxDB::Logging.log_level = Logger::DEBUG
InfluxDB::Logging::log? would return true, allowing the log statement to
proceed, but #log would not do anything because the Logger object was
still at its default from initialization, Logger::INFO.
By setting the log level directly on the Logger object and removing
::log? we allow the Logger object to determine if a log level needs to
be logged or not.
This allows debug-level log messages to be displayed.1 parent 2f4b3fd commit 9ac441e
1 file changed
+5
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
37 | | - | |
38 | 31 | | |
39 | 32 | | |
40 | 33 | | |
| |||
0 commit comments