Download the PHP package mongoose-studio/phobos-framework-logger without Composer

On this page you can find all versions of the php package mongoose-studio/phobos-framework-logger. 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 phobos-framework-logger

Phobos Framework - Logger

PHP Version PSR-3 Phobos Framework

Phobos Framework

Librería satélite opt-in de logging estructurado para Phobos Framework. Logs JSON line-delimited con contexto de traza automático (trace_id/request_id), redacción de datos sensibles y writers intercambiables. Implementa PSR-3 sin arrastrar Monolog ni ninguna otra dependencia pesada — fiel al minimalismo del núcleo, que a propósito no trae logger.

Características

Instalación

Dependencias

Uso

1. Registrar el provider (módulo raíz)

2. Middleware global (contexto de traza + access-log)

Primero en la cadena, para que todo lo demás ya loguee con contexto:

3. Loguear desde un service (inyección por constructor)

Depende de LoggerInterface (PSR-3), no de la clase concreta: testeable y reemplazable.

4. Excepciones no manejadas (entry point)

5. Propagar la traza hacia afuera

Formato del registro

tenant_id/actor_id se promueven a la raíz: se fijan una vez en el LogContext (p. ej. en el middleware de auth) y salen en todos los registros del request.

Configuración (config/logging.php)

Todo es opcional; sin archivo, los defaults funcionan.

Writer Uso Salida
stdout Producción (K8s) JSON line-delimited a stdout; el agente (Promtail/Grafana Agent) lo lleva a Loki
pretty Desarrollo Consola coloreada y legible
file VPS/scripts JSON append a archivo con lock (la rotación es de logrotate)
memory Tests Acumula en memoria (records(), last(), clear())
null Apagado Descarta todo

Redacción

Sin PII ni secretos en los logs, en ningún ambiente. Dos mecanismos:

Testing (en tu proyecto)

Bindea el writer de memoria y afirma sobre lo logueado:

Relación con el Observer del core

El Observer (trace(), Observer::dumpFormatted()) es una línea de tiempo en memoria para depurar un request puntual; no persiste ni sale del proceso. Este Logger es para producción: estructurado, persistente (stdout → Loki) y correlacionado por trace_id. Son complementarios.

Tests de la librería

Licencia

Este proyecto está licenciado bajo la Licencia MIT - ver el archivo LICENSE para más detalles.

Autor

Marcel Rojas
[email protected]
Mongoose Studio

Contribuciones

Las contribuciones son bienvenidas. Por favor:

  1. Fork el proyecto
  2. Crea una rama para tu feature (git checkout -b feature/amazing-feature)
  3. Commit tus cambios (git commit -m 'Add amazing feature')
  4. Push a la rama (git push origin feature/amazing-feature)
  5. Abre un Pull Request

Phobos Framework by Mongoose Studio


All versions of phobos-framework-logger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
mongoose-studio/phobos-framework Version ^3.1
psr/log Version ^3.0
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 mongoose-studio/phobos-framework-logger contains the following files

Loading the files please wait ...