Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Debug helper
Whenever you run into a problem, or more particular... an end-user has a problem, debug logging would be helpful. Especially during the initial deployment phase of a new Scense installation as a helpdesk/support engineer you would like the Scense logfiles. Especially if the debug log would be enabled.

Attached you will find a SPK that helps you on this:
This is an 'application' that enables the Scense debug logging (environment variable SCENSEDEBUG=1) and provides the users with a shortcut in the start menu in 'Selfservice' to backup the Scense logging.

Upon copying the logfile to a pre-defined location (environment variable BACKUPPATH) the user could forward this logfile to the servicedesk, or the servicedesk could grab it from a common share.

Messages are shown to the user for both success and if there is an issue...

Attached Files
.spk   Scense_Debug_Helper.spk (Size: 15,6 KB / Downloads: 9)
After import and trying to edit the application this happens:

'An error occured while initializing the property page for 'APPLICATION_E'.
Please make sure all objects and siteparameters are properly set.

Error details: BOF of EOF is waar, of de huidige record is verwijderd. Voor de gewenste bewerking moet er een huidig record zijn.
In: OnInitialize (Show Object Details).

Ok... may be my bad...
I created the export on my (new) Scense 10 environment...

The 'simple' explanation of the module:
  • Enable Scense Debug
    On system startup or user logon (determine yourself) add an environment action that sets a variable: SCENSEDEBUG=1
  • Create a Generic Application: Backup Scense Logging
    Give it a scope that covers your need, either assign a domain group membership (preferred) or just assign it to domain users (everyone)
  • In the user logon action:
    Add a Scense Classic shortcut called 'Backup Scense Logging.lnk' in '%PROGRAMS%\Selfservice'
  • Assign a condition to 'Start Actions'
    I would assign 2 condition items: Check if your desired target folder (H:\Logfiles, \\MyServer\LogFiles) exists (should be world writable) and check if the logfile "%TEMP%\ScenseLogFiles\Scense.Client.log" exisits
  • Add actions to the start actions event:
    Runmode False: Message action indicating that the backup can not be performed as the preconditions are not met (log file or backup location does not exisit)
    Runmode True: File action: Copy file from "%temp%\scenselogfiles\scense.client.log" to "<your backup folder>\%DATE%-%USERNAME%-%COMPUTERNAME%.log"
    Runmode True, condition "<your backup folder>\%DATE%-%USERNAME%-%COMPUTERNAME%.log" exists: Show success message
    Runmode True, condition "<your backup folder>\%DATE%-%USERNAME%-%COMPUTERNAME%.log" does NOT exists: Show failed message
Of course there are quite some extensions to add, like:
  • pre-creating the backup folder in the user's homedrive
  • Auto-notify of servicedesk
  • fixing the %DATE%-name, as this will fail in US format as mm/dd/yyyy is no valid filenameformat ('/' is not allowed)
  • Extending for multiple logs a day (now the 2nd log backup will overwrite the first)
Good luck! 

Forum Jump:

Users browsing this thread: 1 Guest(s)