AOEpeople/Aoe_LogViewer

Name: Aoe_LogViewer

Owner: AOE

Description: Access logs from the Magento backend

Created: 2014-01-14 17:37:52.0

Updated: 2017-06-22 18:25:27.0

Pushed: 2014-01-14 17:38:25.0

Homepage: null

Size: 132

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Aoe_LogViewer

A very thin and configurable layer between you and your logs :)

This is a simple module that enables you to configure logs and commands to display log file in the backend.

Currently only log files and shell commands are supported, but in theory log content could be retrieved from any source (e.g. databases, GrayLog,…) and other commands could be used to filter and preprocess the data before being displayed.

Adding a new log and commands
fig>
<global>
    <aoe_logviewer>
        <logs>
            <system.log>
                <label>system.log</label><!-- shows in the drop down -->
                <file_path>###LOGDIR###/system.log</file_path><!-- ###LOGDIR## will be replaced -->
                <model>aoe_logviewer/log_file</model><!-- Aoe_LogViewer_Model_Log_Abstract -->
                <sort_order>10</sort_order>
                <!--<disabled>1</disabled>-->

                <commands>
                    <tail>
                        <label>Last n lines (newest first)</label><!-- shows in the drop down -->
                        <command_string>tail -n %2$s '%1$s' | tac</command_string><!-- %1$s: file, %2$s: number of lines (currently hardcoded) -->
                        <model>aoe_logviewer/command_shell</model><!-- must extend Aoe_LogViewer_Model_Command_Abstract -->
                        <sort_order>10</sort_order>
                        <!--<disabled>1</disabled>-->
                    </tail>

                    <!-- ... add more commands for the current log here ... -->

                </commands>

            </system.log>

            <!-- ... add more logs here ... -->

        </logs>
    </aoe_logviewer>
</global>
nfig>
TODO / Ideas

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.