Git Product home page Git Product logo

aoe_logviewer's Introduction

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

<config>
	<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>
</config>

TODO / Ideas

  • Reload log content via AJAX.
  • Add a refresh button.
  • Add a auto-refresh function.
  • Make number of rows configurarable
  • Add paging to log (this will be a challenge for the shell commands)
  • Add configurable row decorators that can parse the row and display them differently than plain text
  • Add scheduler function that can process logs, look for some keywords and add messages to the Magento backend.
  • Add system.log/tail to reuse/reference command configurations instead of duplicating them. Overwriting parts should still be possible.

aoe_logviewer's People

Contributors

drobinson avatar fbrnc avatar leesaferite avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.