!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/monolog/monolog/src/Monolog/Handler/   drwxr-xr-x
Free 116.86 GB of 200.55 GB (58.27%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     SamplingHandler.php (2.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Monolog package.
 *
 * (c) Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Monolog\Handler;

/**
 * Sampling handler
 *
 * A sampled event stream can be useful for logging high frequency events in
 * a production environment where you only need an idea of what is happening
 * and are not concerned with capturing every occurrence. Since the decision to
 * handle or not handle a particular event is determined randomly, the
 * resulting sampled log is not guaranteed to contain 1/N of the events that
 * occurred in the application, but based on the Law of large numbers, it will
 * tend to be close to this ratio with a large number of attempts.
 *
 * @author Bryan Davis <bd808@wikimedia.org>
 * @author Kunal Mehta <legoktm@gmail.com>
 */
class SamplingHandler extends AbstractHandler
{
    
/**
     * @var callable|HandlerInterface $handler
     */
    
protected $handler;

    
/**
     * @var int $factor
     */
    
protected $factor;

    
/**
     * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler).
     * @param int                       $factor  Sample factor
     */
    
public function __construct($handler$factor)
    {
        
parent::__construct();
        
$this->handler $handler;
        
$this->factor $factor;

        if (!
$this->handler instanceof HandlerInterface && !is_callable($this->handler)) {
            throw new \
RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object");
        }
    }

    public function 
isHandling(array $record)
    {
        return 
$this->handler->isHandling($record);
    }

    public function 
handle(array $record)
    {
        if (
$this->isHandling($record) && mt_rand(1$this->factor) === 1) {
            
// The same logic as in FingersCrossedHandler
            
if (!$this->handler instanceof HandlerInterface) {
                
$this->handler call_user_func($this->handler$record$this);
                if (!
$this->handler instanceof HandlerInterface) {
                    throw new \
RuntimeException("The factory callable should return a HandlerInterface");
                }
            }

            if (
$this->processors) {
                foreach (
$this->processors as $processor) {
                    
$record call_user_func($processor$record);
                }
            }

            
$this->handler->handle($record);
        }

        return 
false === $this->bubble;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.012 ]--