承接 marc/epilog 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marc/epilog

Composer 安装命令:

composer require marc/epilog

包简介

Epilog is a CLI log viewer with style

关键字:

README 文档

README

Epilog

Build Status Coverage Status Scrutinizer Quality Score Latest Stable Version Total Downloads License SensioLabsInsight

The lightweight, themeable and interactive PSR-3 log viewer. Monitor monologs with style:

asciinema

Install

As a composer project dependency:

{
    "require": {
        "marc/epilog": "~1.0"
    }
}

As a packed phar:

wget https://github.com/marcioAlmada/epilog/raw/master/bin/epilog && chmod +x epilog
mv epilog /usr/local/bin/ # or somewhere in your $PATH

As a composer global package:

composer global require marc/epilog:~1.0

Or build the phar yourself:

# install box2 -> https://github.com/box-project/box2
git clone https://github.com/marcioAlmada/epilog.git
cd epilog
composer install
make # phar will available at bin/ folder
sudo make install # will put epilog at /usr/local/bin/ folder

Quick test

Run epilog pretend command and tail a fake log stream. Check if output looks good:

epilog pretend

Usage

Basic usage is:

epilog watch /path/to/monolog/file.log [<args>]...

While epilog is monitoring the log file (or a fake stream), hit [return] to see a nice interactive menu:

$ [ ⏎ ]

Woot! Epilog here. Please type a theme number, a valid regexp or a valid flag:

[#] load another theme:

    1:chaplin       2:forest
    3:scrapbook     4:punchcard
    5:sunset        6:sunrise
    7:traffic       8:usa

[ r ] load random theme from list above.
[ i ] toggle invert theme.
[ c ] clear screen.
[ - ] reset regexp filter.
[ q ] quit.

Framework Integration

Epilog can use log finders to look for logs inside app directories according to framework conventions so you don't need to aim at your latest log files mannualy. Ex:

$ epilog watch ~/www/my-project --app laravel
# instead of long and boring
$ epilog watch ~/www/my-project/app/storage/logs/log-cli-server-2015-01-11.txt

PRs implementing log finders to support your framework of choice are highly encouraged :octocat:

Themes

Epilog themes are very simple yml files with hooks where you can put ANSI color escape sequences and literal text. The hooks will decorate each log line, nyancatyze your terminal and sometimes puke rainbows. Here is a theme example:

name: Punched Card
author: Márcio Almada
theme:
    extends: default
    # the log line template
    # template tags are: {date}, {level}, {logger}, {message}, {context}, {extra}
    template: "{level} {date} {message} [{logger}] [{context}] [{extra}]"
    # literal string that will be prepended to entire line
    prepend: ""
    # literal string that will be appended to entire line
    append: "\e[0m\n"
    # level section
    level:
        padding: 10
        DEBUG:
            prepend: "\e[2m"
        INFO:
            prepend: "\e[2m"
        NOTICE:
            prepend: "\e[2m"
        WARNING:
            prepend: "\e[2m"
        ERROR:
            prepend: "\e[1m"
        CRITICAL:
            prepend: "\e[1m"
        ALERT:
            prepend: "\e[1m"
        EMERGENCY:
            prepend: "\e[1m"
        DEFAULT:
            prepend: " -------- \e[1m"

Which will make log lines look like the following, when interpreted:

punchcard theme

Roadmap

  • Basic functionalities
  • Add --app option to allow easy framework integration. Ex: epilog watch /my/project --app laravel
  • Add listen command to aggregate log entries through a REST API. Ex: epilog listen --port 8888
  • Add server command to view logs in a browser instead of terminal epilog server <file> --port 8888
  • Add better unicode support, more themes etc
  • Bother with windows ... anyone?
  • Other cool things, probably
  • Release stable version

Contributions

Found a bug? Have an improvement? Take a look at the issues.

Guide

  1. Fork marc/epilog
  2. Clone forked repository
  3. Install composer dependencies $ composer install
  4. Run unit tests $ phpunit
  5. Modify code: correct bug, implement features
  6. Back to step 4

Copyright

Copyright (c) 2014-2015 Márcio Almada. Distributed under the terms of an MIT-style license. See LICENSE for details.

marc/epilog 适用场景与选型建议

marc/epilog 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.13k 次下载、GitHub Stars 达 34, 最近一次更新时间为 2014 年 09 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「log」 「Viewer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 marc/epilog 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 marc/epilog 我们能提供哪些服务?
定制开发 / 二次开发

基于 marc/epilog 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.13k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 35
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 34
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-09-20