Download the PHP package larsgmortensen/litelog without Composer

On this page you can find all versions of the php package larsgmortensen/litelog. 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 litelog

LiteLog – A Lightweight & High-Performance JSON Logger for PHP

LiteLog is a fast, minimal, efficient, single-file JSON logger focused on robustness and runtime performance.
It provides atomic appends, safe log rotation, and strict error handling with zero dependencies.
Designed for high-traffic PHP applications that require reliable logging without external bloat (PHP 8.0+).


πŸš€ Features that make LiteLog stand out


πŸ“¦ Installation

Via Composer (recommended):

`

Or manually include the class file (e.g. src/LiteLog/LiteLog.php) with Composer’s autoloader or require_once:

Tip: Always place your log directory outside webroot, or protect it with .htaccess.


πŸš€ Quick Start

Example log output (JSON line)


🧰 API

Parameters


πŸ“– Usage Notes


πŸ§ͺ Tests

LiteLog is verified by three test suites:

  1. Sanity tests (test_litelog_new.php) Validates JSON encoding, rotation, retention, and path sanitization.

  2. Benchmarks (bench_litelog.php, bench_litelog_web.php) Measures performance vs. old implementation. Results (shared hosting, 100k lines):

    • OLD: \~1643 ops/s
    • NEW: \~1476 ops/s (β‰ˆ10% overhead for safe locking)
  3. Concurrency test (concurrency_run.php) Spawns multiple parallel PHP processes writing to the same log file. βœ… 400 000 lines written without loss or duplication under rotation.

πŸ’‘ Why LiteLog?

LiteLog exists for developers who want reliable structured logging without dragging in heavy frameworks.

✨ Fast – 1.5–2k ops/s even on modest hardware.

✨ Safe – Atomic writes, no lost lines under concurrency.

✨ Structured – JSON lines are machine-readable.

✨ Lightweight – One file, static API, no dependencies.

✨ Robust – Strict error handling, sanitization, rotation + retention built-in.


πŸ“¦ Packagist

LiteLog on Packagist: πŸ‘‰ https://packagist.org/packages/larsgmortensen/litelog


πŸ“œ License

LiteLog is released under the GNU General Public License v3.0. See LICENSE for details.


🀝 Contributing

Contributions are welcome! Fork, submit issues, or open a pull request.


✍️ Author

Developed by Lars Grove Mortensen Β© 2025. Feel free to reach out or contribute!


LiteLog – the lightweight JSON logger you can trust πŸš€


🌟 If you find this library useful, give it a star on GitHub! 🌟


All versions of litelog with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
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 larsgmortensen/litelog contains the following files

Loading the files please wait ...