OpenServerPanel/system/templates/tail.bat
2024-04-17 07:45:29 +03:00

20 lines
684 B
Batchfile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
set "ESC="
setlocal enabledelayedexpansion
set "width="
for /f "tokens=2 delims=:" %%a in ('mode con^|more +4') do if not defined width set /a width=%%a
for /l %%a in (1,1,%width%) do set "line=!line!─"
if exist "%1" for %%S in ("%1") do if %%~zS==0 (
echo %ESC%[90m%line%%ESC%[0m
echo %ESC%[36m{lang_journal} %1 ^({lang_empty_log}^)%ESC%[0m
echo %ESC%[90m%line%%ESC%[0m
) else (
echo %ESC%[90m%line%%ESC%[0m
echo %ESC%[36m{lang_journal} %1%ESC%[0m
echo %ESC%[90m%line%%ESC%[0m
"{root_dir}\system\bin\tail.exe" %1 -%2 | "{root_dir}\system\bin\bat.exe" -f -l log --style=plain --theme=ansi
echo:
echo %ESC%[90m%line%%ESC%[0m
)
endlocal