Skip to content

Commit 317c9a3

Browse files
committed
Set up logger in entrypoint as well
1 parent 72fd312 commit 317c9a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Run/entrypoint.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
// limitations under the License.
1414

1515
import App
16+
import Dependencies
1617
import Logging
1718
import Vapor
1819

20+
1921
@main
2022
enum Entrypoint {
2123
static func main() async throws {
@@ -24,6 +26,10 @@ enum Entrypoint {
2426

2527
let app = try await Application.make(env)
2628

29+
prepareDependencies {
30+
$0.logger = app.logger
31+
}
32+
2733
do {
2834
try await configure(app)
2935
} catch {

0 commit comments

Comments
 (0)