Tag: scripting
-
Simple logging with rotation and custom format in Python
Sometimes I find myself having to write a short Python script with proper logging capabilities. This code snippet demonstrates how to do use Python’s official logging module using very few lines but still with all these features in: basicConfig log rotation formating The following lines are interesting: ‘/path/to/log/file.log’ -> lets you specify where the log […]
-
How to pass parameters to a PHP script executed through the command line
The syntax to pass parameters to PHP scripts executed command line is: For more information: Control your scripts with command-line PHP PHP CLI: Sending parameters via command line