totaltekst/logger 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

totaltekst/logger

最新稳定版本:v0.02

Composer 安装命令:

composer require totaltekst/logger

包简介

A package for logging

关键字:

README 文档

README

Enables logging through monolog or Google logs

Requirements

  • PHP 8.0+

Note To use Google logging, you need to make sure the application has google credentials set. (Normally through env var GOOGLE_APPLICATION_CREDENTIALS).

Installation

Install the latest version with

composer require totaltekst/logger

Basic Usage for Google logging

<?php

use Totaltekst\Logger\Log;

// Setup to use Google logger, level DEBUG
Log::init_logger('my_app_name', Level::Debug, 'google', 'my-project-id');

// Write to the log using static methods:
Log::alert('Starting up my app', ["data" => $args]);
# 
# 
Log::info('Shutting down');

Basic usage for logging to errorlog using monolog

<?php

use Totaltekst\Logger\Log;

// Setup to use monolog, level DEBUG
Log::init_logger('my_app_name', Level::Debug, 'errorlog');

// Write to the log using static methods:
Log::alert('Starting up my app', ["data" => $args]);
# 
# 
Log::info('Shutting down');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-19