Hello,
I have a question about Slim Framework’s logs and Cloud Foundry.
I have an app that uses the Slim logs this way :
$app = new \Slim\Slim ( array (
'log.writer' => new logHelper ( array (
'path' => LOG_DIRECTORY_PATH,
'fileName' => 'myapp_mycollection',
'extension' => 'log',
'messageFormat' => '%host% - %user% [%dateTime%] "%referer%" "%userAgent%" : %message%'
) )
) );
$app->log->setEnabled ( true );
$app->log->info("My Log here");
This works perfectly fine by the way on a non-CF environment.
Now I’m migrating my app to CF.
I’d like to know if there’s a way I can still use the Slim log.writer ?
I’ve tried this approach (found on another forum):
$_ENV['SLIM_MODE'] = 'development';
$app = new \Slim\Slim ( );
$app->configureMode('development', function () use ($app) {
$app->config(array(
'log.enable' => true,
'log.level' => \Slim\Log::DEBUG,
'debug' => true
));
});
But with no luck, I can’t find the “My log here” anywhere… (doesn’t seem to return any error either)
Is there anyone here who knows if it’s possible to keep using the log.writer on CF and how to ?
I’m kinda new on the CF part, thanks in advance for any help guys!