Cloudfoundry php-buildpack logging

242 Views Asked by At

I have a question regarding Slim configuration for the Cloud Foundry. I'm using the latest build pack version and 'nginx' for my app.

$_ENV['SLIM_MODE'] = 'development';

//Slim App Instance 
$app = new \Slim\Slim();

$app->configureMode('development', function () use ($app) { 
    $app->config(array( 
        'log.enable' => true, 
        'log.level' => \Slim\Log::DEBUG, 
        'debug' => true 
    )); 
});

$app->group('/v1', function () use ($app) {

$app->get('/hello/:name', function ($name) use ($app) {
    $app->getLog()->info('###Some text###');
    $response = $app->response();
    $response['Content-Type'] = 'application/json';
    $response->status(201);
    $response->body(json_encode(['hello' => $name]));
});
});

Unable to see the following text in the Cloud Foundry logs. Did I miss something?

0

There are 0 best solutions below