- ⌂ repo
- Methods
- Constructor
- execute()
- get()
- get_content_type()
- get_first()
- get_object()
- get_object_by_id()
- get_object_by_oid()
- get_object_by_doid()
- get_object_by_uuid()
- get_objects_by_id()
- get_objects_by_oid()
- get_objects_by_doid()
- get_objects_by_uuid()
- get_root()
- get_row()
- get_rows()
- get_system_property()
- log_alert()
- log_critical()
- log_to_file()
- log_to_html()
- new_collection()
- new_object()
- peek_user()
- pop_user()
- push_super_user()
- push_user()
- query()
- supports_dimensions()
- switch_user()
- uninit()
- with()
repo::log_to_file()
Starts writing events logged to the repo::SystemLog to a file, in addition to maintaining the repo::SystemLog. Writing will end when the repo is destroyed/released from memory.
Prototype
string log_to_file(string $filename = NULL)
Parameters
- filename - Optional, full file path where to write the logged events. If not specified, it will default to a log file in the temporary path, as configured in config.php under io_comand > comand > temp_path (default is webcomand/system/tmp)
Return
Returns the file path to the log file.
Example
$repo->log_to_file("/var/www/webcomand/files/logs/comand.log");