Skip to content
Juhani Aronen edited this page Oct 20, 2021 · 2 revisions

Returns json data about logs.

  • URL

    /log-reader/api/v1/logs.json

  • Method:

    POST

  • Data Params

    files = error.log,debug.log File names to read separated with coma. See the files section
    types = error,debug list of log types that will be shown separated with coma. See the types section

  • Response:

    "logs": [
        {
            "date": "2021-09-29 17:23:15",
            "type": "Info",
            "message": "Getting products..."
        },
        {
            "date": "2021-09-29 17:23:20",
            "type": "Info",
            "message": "Products loaded!."
        },
        {
            "date": "2021-09-29 17:57:50",
            "type": "Notice",
            "message": "Notice (8): Undefined variable: productID in [/var/www/test/plugins/test/src/testHelper.php, line 600] Trace: Cake\\Error\\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 168 test\\testHelper::getData() - ROOT/plugins/test/src/testHelper.php, line 600 test\\Shell\\Task\\test::main() - ROOT/plugins/test/src/Shell/Task/test.php, line 61 test\\Shell\\DataShell::main() - ROOT/plugins/test/src/Shell/DataShell.php, line 49 Cake\\Console\\Shell::runCommand() - CORE/src/Console/Shell.php, line 531 Cake\\Console\\CommandRunner::runShell() - CORE/src/Console/CommandRunner.php, line 384 Cake\\Console\\CommandRunner::run() - CORE/src/Console/CommandRunner.php, line 162 [main] - ROOT/bin/cake.php, line 12   "
        },
        {
            "date": "2021-09-29 17:57:50",
            "type": "Notice",
            "message": "Notice (8): Undefined variable: data in [/var/www/test/plugins/test/src/testHelper.php, line 600] Trace: Cake\\Error\\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 168 test\\testHelper::getData() - ROOT/plugins/test/src/testHelper.php, line 600 test\\Shell\\Task\\test::main() - ROOT/plugins/test/src/Shell/Task/test.php, line 61 test\\Shell\\DataShell::main() - ROOT/plugins/test/src/Shell/DataShell.php, line 49 Cake\\Console\\Shell::runCommand() - CORE/src/Console/Shell.php, line 531 Cake\\Console\\CommandRunner::runShell() - CORE/src/Console/CommandRunner.php, line 384 Cake\\Console\\CommandRunner::run() - CORE/src/Console/CommandRunner.php, line 162 [main] - ROOT/bin/cake.php, line 12   "
        },
        {
            "date": "2021-09-29 17:58:34",
            "type": "Info",
            "message": "Getting data..."
        },
        {
            "date": "2021-09-29 17:58:34",
            "type": "Info",
            "message": "Data loaded"
        }
    ]
}```

Wiki

Resources

Clone this wiki locally