Upload monolog log files to Loggly.
- composer install
- copy
config.example.json
asconfig.json
and put there your loggly key.
- Edit the
start.php
file and provide the path to one of your log files. - call the script
php start.php
If your log files are on a different server, you can automate the log file transfer using the sftp
command. Create a file called sftp_commands.txt
and put the command that should be executed after connection:
cd websites/project/logs
get 2018-10-06.log
exit
Then you can call the sftp
command with that file:
sftp -b sftp_commands.txt username@example.com