Code Monkey home page Code Monkey logo

php-web-profiler's People

Contributors

jnunez-clicars avatar jonijnm avatar pana1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jonijnm

php-web-profiler's Issues

logRotate is not working

logRotate tries to search how many logs are there:

private function logRotate(): void
{
$storage = $this->getStorage();
$logs = $storage->find([]);
if ($this->keepMaxLogs < count($logs)) {
$storage->clear();
}
}

But the find has a second parameter to only search for 20 files:

https://github.com/maximebf/php-debugbar/blob/ea5bfc41e54b8ea924e30dcac3d25e1b2c3b0f31/src/DebugBar/Storage/StorageInterface.php#L39

Allow set max number of logs to collect

To avoid memory problems, allow to set the maximum number of logs to collect, maybe here:

public function addLog(string $message, string $type, array $context = [])
{
$this->logs[] = [
$type,
$message,
$context,
array_slice(debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS), 1),
];
}

public function addStatement(array $data): void
{
$this->statements[] = $data;
}

one parameter in the constructor with the max number of "rows" or bytes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.