I create a small class for save the logs of my website. My log class : 

```
class Logs {

public static function  writeFile($message)
{
    $log_path = '/home/vagrant/Workspace/symfony/app/logs';
    // Set path:
    $log_path .= '/' . date('Ymd');
    $log_path .= '.log';
    $s_message = date("Y-m-d H:i:s") . ' (' . microtime(true) . ') ' . $message;
    $s_message .= "\n";
    file_put_contents($log_path, $s_message, FILE_APPEND);
}
public static function logInfo($s_message)
{
    self::writeFile($s_message);
}

}

```

And I call the static method in my controller : 

```
public function indexAction()
{
    $em = $this->getDoctrine()->getManager();
    $categories = $em->getRepository('EnsJobeetBundle:Category')->getWithJobs();
    $test = array(
        '1'=>'1',
        '2'=>'2',
        '3'=>'3'
    );
    Logs::logInfo(print_r($test));

    return $this->render('EnsJobeetBundle:Job:index.html.twig', array(
        'categories' => $categories
    ));
}

```

The problem is that : in my view it's show this $test array and in my log is write only the first value of array, so the value 1.
What I'm doing wrong? Help me please! Thx in advance!