More log cleanup. Made switch to enable debug logging.
This commit is contained in:
parent
15b8fc2c84
commit
5631981e2e
3 changed files with 8 additions and 8 deletions
|
@ -389,6 +389,7 @@ Config_saveSession() {
|
|||
#i::Manager_getWindowInfo() ; Get information for the active window (id, title, class, process name, style, geometry, tags and floating state).
|
||||
#+i::Manager_getWindowList() ; Get a window list for the active view (id, title and class).
|
||||
#^i::Manager_logWindowList()
|
||||
#^d::Log_toggleDebugEnabled()
|
||||
|
||||
#Tab::View_setLayout(-1) ; Set the previously set layout. You may also use View_setLayout(">") for setting the next layout in the layout array.
|
||||
#\::View_setLayout(3) ; Set the 3rd defined layout (i. e. floating layout in the default configuration).
|
||||
|
|
11
src/Log.ahk
11
src/Log.ahk
|
@ -18,11 +18,8 @@
|
|||
* @version 8.3.0
|
||||
*/
|
||||
|
||||
Log_init() {
|
||||
Global
|
||||
Log_debug_enabled := 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
Log_msg( message ) {
|
||||
FormatTime, CurrentTime, , yyyyMMddHHmmss
|
||||
FileAppend, %CurrentTime% %message%`r`n, bugn_log.txt
|
||||
|
@ -34,6 +31,8 @@ Log_bare( message ) {
|
|||
FileAppend, %padded_message% , bugn_log.txt
|
||||
}
|
||||
|
||||
Log_debug_enabled := 0
|
||||
|
||||
Log_toggleDebugEnabled() {
|
||||
Global
|
||||
If (Log_debug_enabled = 1)
|
||||
|
@ -55,5 +54,5 @@ Log_dbg_msg( message ) {
|
|||
Log_dbg_bare( message ) {
|
||||
Global
|
||||
If (Log_debug_enabled = 1)
|
||||
Log_msg( "DEBUG: " . message )
|
||||
Log_bare( "DEBUG: " . message )
|
||||
}
|
|
@ -263,7 +263,7 @@ Manager_logWindowInfo( w ) {
|
|||
WinGet, aWndStyle, Style, ahk_id %w%
|
||||
WinGetPos, aWndX, aWndY, aWndW, aWndH, ahk_id %w%
|
||||
|
||||
Log_bare(" " . w . "`t" . aIsBugnActive . " " . aIsFloating . " " . aIsHidden . " " aIsWinFocus . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle)
|
||||
Log_bare(w . "`t" . aIsBugnActive . " " . aIsFloating . " " . aIsHidden . " " aIsWinFocus . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle)
|
||||
}
|
||||
|
||||
Manager_logWindowList() {
|
||||
|
@ -271,7 +271,7 @@ Manager_logWindowList() {
|
|||
|
||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||
Log_msg( "Window dump for active view (" . Manager_aMonitor . ", " . v . ")" )
|
||||
Log_bare( " ID`t`tA F H W`tX`tY`tW`tH`tStyle`t`tTitle")
|
||||
Log_bare( "ID`t`tA F H W`tX`tY`tW`tH`tStyle`t`tTitle")
|
||||
|
||||
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%v%_wndIds, 1
|
||||
Loop, PARSE, wndIds, `;
|
||||
|
|
Loading…
Reference in a new issue