Download the PHP package liyk/mlog without Composer

On this page you can find all versions of the php package liyk/mlog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mlog

wlog: 一个基于monolog封装的日志类工具

功能扩展:

1:日志初始化配置(目录、默认通道、每天默认日志大小、登录用户id设置,钉钉机器人)
2:日期自动切割
3:根据日志级别生成日志
4:日志记录有进程id,用以查看一次请求的所有日志信息
5:日志记录有唯一标识符
6:支持发送日志内容给钉钉机器人

日志示例

初始化示例:

\Xiangxin\Logger\MLog::init('/home/work/rd/lyk/weblog/', '', '', $user_id, '47c9ef42bc9237cc2d1cb1500ea6b3c4339a60040505d35a3e6606cb9e6');
参数1:日志路径
参数2:默认通道名
参数3:日志大小(超出切分)
参数4:登录用户id
参数5:钉钉机器人token

调用示例:

\Xiangxin\Logger\MLog::info('测试标题', [['name' => 'lyk'], ['code' => '测试内容']], 'channel_name', true);
参数1:日志标题信息
参数2:日志数组信息
参数3:通道名称
参数4:是否钉钉推送

1: info级别日志

{"message":"time:2021-06-30 17:37:52###userId:3604###msg:1开票统计报表###trace:[3604][/home/web/stat/controllers/StatInvoiceController.php:42] \n\n","context":[{"name":"lyk"},{"code":"1开票统计报表"}],"level":200,"level_name":"INFO","channel":"1invoice","datetime":"2021-06-30T17:37:52.047481+08:00","extra":{"url":"/api/stat/invoice?pay_type=1&product_date_start=2021-03-01&product_date_end=2021-06-09&load=0","ip":"111.198.71.156","http_method":"GET","server":"xxx.com","referrer":null,"process_id":29306,"uid":"ee903b3"}}

2:sql日志

{"message":"time:2021-07-01 14:55:16###userId:6284###msg:SQL:SELECT s.scope_city,i.unit_id,i.self_price,i.currency_id,i.bill_id,b.bill_code,b.invoice_status,u.name,u.join_type from financial_item as i left join stat_zhongtai_box as s on i.box_id=s.box_id left join financial_bill as b on i.bill_id=b.id left join financial_unit as u on i.unit_id=u.id where s.box_id>0 and (b.from_business=1 or b.from_business is null) AND s.id>=52292 AND s.min_product_time >= '2021-03-01 00:00:00' and s.min_product_time <= '2021-06-09 23:59:59' AND i.pay_type = 1 0.090804100036621###trace: \n\n","context":{},"level":100,"level_name":"DEBUG","channel":"default","datetime":"2021-07-01T14:55:16.898858+08:00","extra":{"url":"/api/stat/invoice?pay_type=1&product_date_start=2021-03-01&product_date_end=2021-06-09&load=0","ip":"111.198.71.156","http_method":"GET","server":"xxx.com","referrer":null,"process_id":29462,"uid":"f0a7f0a"}}


All versions of mlog with dependencies

PHP Build Version
Package Version
Requires monolog/monolog Version ^2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package liyk/mlog contains the following files

Loading the files please wait ....