log message
This commit is contained in:
@@ -23,9 +23,11 @@ class Home extends BaseController
|
|||||||
try {
|
try {
|
||||||
// Send a ping to confirm a successful connection
|
// Send a ping to confirm a successful connection
|
||||||
$client->selectDatabase('admin')->command(['ping' => 1]);
|
$client->selectDatabase('admin')->command(['ping' => 1]);
|
||||||
echo "Pinged your deployment. You successfully connected to MongoDB!\n";
|
//echo "Pinged your deployment. You successfully connected to MongoDB!\n";
|
||||||
|
log_message('critical', "Pinged your deployment. You successfully connected to MongoDB!");
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
printf($e->getMessage());
|
log_message('critical', "Pinged your deployment. You failed connected to MongoDB! :: ".$e->getMessage());
|
||||||
|
// printf($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
//$client->createDBRef()
|
//$client->createDBRef()
|
||||||
|
|||||||
Reference in New Issue
Block a user