Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15394

Scripting • Re: The maximum size of a read/written file.

$
0
0
Maybe my idea is stupid :roll: , but it works for some applications, for example writing the result of the /console/inspect command to a file. You can use the system logging.

I have defined a new action for logging (/system/logging)
name=diskDebug
type=disk
file-name=flash/debug
lines-per-file=100000
file-count=5

Then a new logging rule
topics=debug,script
action=diskDebug

Inside the script, just insert the line:
Code:
:log debug message=";$yourVariable"

Note that the message begins with a semicolon so that you can easily separate the lines later (in Notepad++ or Excel...). Of course, you can use any other character for this purpose. If you have an external drive, e.g. a USB stick, you can save files to it instead of /flash. In this case, the file size is limited (probably) only by the disk size.

Statistics: Posted by miku — Mon Mar 04, 2024 1:50 pm



Viewing all articles
Browse latest Browse all 15394

Trending Articles