diff --git a/bin/migrate b/bin/migrate index 736533d..a2705a4 100755 --- a/bin/migrate +++ b/bin/migrate @@ -1,15 +1,7 @@ #!/usr/bin/env php getDatabaseManager(), new Filesy if (! $repository->repositoryExists()) { $repository->createRepository(); - echo "Migration table created.\n"; + logger('migration')->info("Migration table created"); } $migrator->run(__DIR__ . '/../database/migrations'); -echo "Migrations complete.\n"; +logger('migration')->info("Migrations completed successfully"); diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100644 index 0000000..1a6f0c8 --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,26 @@ +pushHandler(new StreamHandler($logsDir . "/{$channel}.log", Logger::INFO)); + $loggers[$channel] = $logger; + } + + return $loggers[$channel]; + } +} \ No newline at end of file