Skip to content

Log entity files loaded from directories in debug mode #4162

@aktraore

Description

@aktraore

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

I lost a couple of hours during the last week because my glob pattern in the ormconfig.json/options object for entities was wrong. I fixed the issue later by putting a breakpoint in DirectoryExportedClassesLoader.ts where the code for loading directory files is located. I was wondering if it would be possible to log (in debug mode) the files loaded or indicate that no files were found using the glob pattern supplied. At first glance the code would be in DirectoryExportedClassesLoader.importClassesFromDirectories . I'd be willing to submit a PR if this is deemed a reasonable request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions