marxjohnson / btsyncindicator

Bittorrent Sync indicator for linux desktops
GNU Lesser General Public License v3.0
41 stars 5 forks source link

Menu Entry "Enable Debug Logging" #4

Closed tuxpoldo closed 11 years ago

tuxpoldo commented 11 years ago

Provide a menu entry "Enable Debug Logging" with the following functionality:

PSEUDOCODE BEGIN

VarStorageDir = get_storage_dir_from_config_file

OnMenuEntryUpdate() {
    if file exist $VarStorageDir . "/debug.txt" {
        add checkmark to menu entry
    } else {
        remove checkmark from menu entry
    }
}

OnMenuEntrySelect() {
    if file exist $VarStorageDir . "/debug.txt" {
        delete $VarStorageDir . "/debug.txt"
    } else {
        echo "FFFF" > $VarStorageDir . "/debug.txt"
    }
}

PSEUDOCODE END

marxjohnson commented 11 years ago

I can do that fairly easily, but what's the purpose? Does btsync log to that file automatically if it exists?

tuxpoldo commented 11 years ago

The purpose is to activate/deactivate debug logging. BitTorrent Sync detects if the file exists and raises its internal verbosity level to maximum (I suppose that FFFF is a bitmask for debug topics). If the file is present and contains FFFF, logging in the standard log file (sync.log in the storage_dir) will be very verbose. See this forum topic.

The menu item can also be found in the Windows and Mac OSX version:

screen shot 2013-09-17 at 9 57 36 pm

marxjohnson commented 11 years ago

I've got a fix ready for this issue, but did you close it because you no longer think it's necessary?

tuxpoldo commented 11 years ago

Sorry! I have closed it unintentionally when editing and I was not able to reopen it...