Here's an example of the log from our login script:
 Code:
NAC Checking is ENABLED.
=========================================================
2016/03/31  -  08:25:51
          Kixtart: 4.63
          Version: 2.8.7
         INI File: C:\Users\gbarnas\AppData\Local\Temp\login.ini (cached)
             User: Glenn Barnas / gbarnas
Locale / Language: 1033 / English (United States)
      LoginServer: \\DC01
           Domain: XXXXXX
       User OU DN: OU=Employees,OU=User Accounts - Regular,OU=Users,OU=UCRoot,DC=xxxxxx,DC=com
   User OU Offset: 0
          User OU: Employees
  Wkstn OU Offset: 0
      Wkstn OU DN: OU=Mobile,OU=Workstations,OU=Computers,OU=UCRoot,DC=xxxxxx,DC=com
         Wkstn OU: Mobile
       Logon Mode: 1
           Laptop: 1
     Detected O/S: Windows 7 Professional Edition / Version 6.1
        Privelege: USER
  Local Privelege: User
        ScriptDir: C:\windows\system32 / C:\windows\system32
         StartDir: \\dc01\netlogon
     User Process: 0
     Session Type: Console
      LP Hard Map: 0
      Debug Level: 1

 Group Membership: 
                    Domain Users
                    Everyone
                    Users
                    Remote Desktop Users
                    Authenticated Users
                    OG-Technicians
                    AC-RDS Access - RDS Hosts
                    OG-Employees
                    RC-VSAFiles
                    Users
                    AfterHours

 - ENVIRONMENT START - 
ACPath=C:\Program Files (x86)\Lenovo\Access Connections\
ALLUSERSPROFILE=C:\ProgramData
<SNIP>
windir=C:\windows
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
 - ENVIRONMENT END - 

Processing active resources:
   Disk: G	\\file\common
   Disk: J	\\file\Downloads
   Disk: U	HOME
Printer: 	\\print\HPLJ4200m	S
		SoftMap - Exists
		Pre-existing default
Printer: 	\\print\XP4600m	N
		SoftMap - Exists
You can see that logging can be quite detailed. Our script displays login info and logs the debug level info.

As Shane mentioned, using RedirectOutput('logfile') at the start of your script will put every message to the log file. If you want to mix log and screen output, you might want to use a function that flips the redirection on and off. The fMsg() function on my web site does just this. Simply call fMsg('screen message', 'log message', options...)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D