I want to enable logging to a batch file which should log all the contents of command prompt including input/output/error. So I have tried something like the following but it results in a empty log file without any contents. It looks, I am missing something. Below is the batch file.
@echo off
SET LOGFILE=C:\Users\xason\Desktop\Logs\logs.txt
call :logit
exit /b 0
:logit
set root=C:\ORACLE\ORA_DRIVERS
cd %root% >> %LOGFILE%
UPDATE.EXE E:\class.ora
ping 127.0.0.1 -n 6 > nul


call :logit >> "%LOGFILE%" 2>&1?