Implemented setting the log level ...

... to an absolute value
This commit is contained in:
joten 2015-01-27 22:33:13 +01:00
parent 9a539e10af
commit f9cfc8e5f5
4 changed files with 22 additions and 15 deletions

View file

@ -11,6 +11,7 @@
1. `~` Renamed the function `Manager_toggleDecor` to `Window_toggleDecor` 1. `~` Renamed the function `Manager_toggleDecor` to `Window_toggleDecor`
2. `~` Renamed the function `View_toggleFloating` to `View_toggleFloatingWindow` 2. `~` Renamed the function `View_toggleFloating` to `View_toggleFloatingWindow`
3. `~` Migrated the following functions to `View_setLayoutProperty`: `View_setGapWidth`, `View_setMFactor`, `View_setMX`, `View_setMY` and `View_rotateLayoutAxis` 3. `~` Migrated the following functions to `View_setLayoutProperty`: `View_setGapWidth`, `View_setMFactor`, `View_setMX`, `View_setMY` and `View_rotateLayoutAxis`
4. `~` Re-implemented the following functions to allow setting absolute and relative values: `Debug_setLogLevel`, `View_setLayout`, `View_setMFactor`
| # | Configuration variables | Hotkeys | | # | Configuration variables | Hotkeys |
| --:| ----------------------- | --------------------------------------------------------- | | --:| ----------------------- | --------------------------------------------------------- |
@ -38,10 +39,14 @@
| | | `+` `#^Right::View_setLayoutProperty("MX", 0, +1)` | | | | `+` `#^Right::View_setLayoutProperty("MX", 0, +1)` |
| | | `-` `#^Left::View_setMX(-1)` | | | | `-` `#^Left::View_setMX(-1)` |
| | | `+` `#^Left::View_setLayoutProperty("MX", 0, -1)` | | | | `+` `#^Left::View_setLayoutProperty("MX", 0, -1)` |
| | | `-` `View_setGapWidth(-2)` | | | | `-` `#+Left::View_setGapWidth(-2)` |
| | | `+` `View_setLayoutProperty("GapWidth", 0, -2)` | | | | `+` `#+Left::View_setLayoutProperty("GapWidth", 0, -2)` |
| | | `-` `View_setGapWidth(+2)` | | | | `-` `#+Right::View_setGapWidth(+2)` |
| | | `+` `View_setLayoutProperty("GapWidth", 0, +2)` | | | | `+` `#+Right::View_setLayoutProperty("GapWidth", 0, +2)` |
| 4. | | `-` `#^d::Debug_setLogLevel(-1)` |
| | | `+` `#^d::Debug_setLogLevel(0, -1)` |
| | | `-` `#^+d::Debug_setLogLevel(+1)` |
| | | `+` `#^+d::Debug_setLogLevel(0, +1)` |
### 8.4.0 ### 8.4.0

View file

@ -96,11 +96,13 @@ and tiled windows of all views) to the log.
two log messages (`Manager_logViewWindowList` and two log messages (`Manager_logViewWindowList` and
`Manager_logManagedWindowList`) to the log. `Manager_logManagedWindowList`) to the log.
`#^d::Debug_setLogLevel(-1)` `#^d::Debug_setLogLevel(0, -1)`
> Decrement the debug log level. Show fewer debug messages. > Decrement the debug log level. Show fewer debug messages. You may also set
the debug log level to an absolute value by using the first parameter.
`#^+d::Debug_setLogLevel(+1)` `#^+d::Debug_setLogLevel(0, +1)`
> Increment the debug log level. Show more debug messages. > Increment the debug log level. Show more debug messages. You may also set
the debug log level to an absolute value by using the first parameter.
### Layout management ### Layout management

View file

@ -415,8 +415,8 @@ Config_UI_saveSession() {
#^i::Debug_logViewWindowList() #^i::Debug_logViewWindowList()
#+^i::Debug_logManagedWindowList() #+^i::Debug_logManagedWindowList()
#^h::Debug_logHelp() #^h::Debug_logHelp()
#^d::Debug_setLogLevel(-1) #^d::Debug_setLogLevel(0, -1)
#^+d::Debug_setLogLevel(+1) #^+d::Debug_setLogLevel(0, +1)
;; Layout management ;; Layout management
#Tab::View_setLayout(-1) #Tab::View_setLayout(-1)

View file

@ -146,13 +146,13 @@ Debug_logWindowInfo(wndId)
Debug_logMessage(text , 0, False) Debug_logMessage(text , 0, False)
} }
Debug_setLogLevel(d) Debug_setLogLevel(i, d) {
{
Global Debug_logLevel Global Debug_logLevel
i := Debug_logLevel + d If (i = 0)
If (i >= 0) i := Debug_logLevel
{ i += d
If (i >= 0) And (i != Debug_logLevel) {
Debug_logLevel := i Debug_logLevel := i
If (i = 0) If (i = 0)
Debug_logMessage("Logging disabled.", 0) Debug_logMessage("Logging disabled.", 0)