Logging
How do Hibernate logs work in bx-orm?
Last updated
Was this helpful?
How do Hibernate logs work in bx-orm?
Last updated
Was this helpful?
There are several categories of logs generated during normal use of a bx-orm application:
bx-orm
logs
SQL logs
Hibernate logs
Logging statements generated from bx-orm itself will be output to the orm.log
file located in the boxlang runtime logs/
directory.
This log file may look something like the below when DEBUG mode is enabled:
For more information on configuring loggers, see the documentation.
bx-orm has the ability to log every SQL statement generated from ORM code. For example, firing entityDelete( myEntity )
will generate a DELETE
SQL statement for deleting the entity (table row) in question from the entity table.
A quick example might be this log, generated after firing entityNew( "Manufacturer", properties )
:
To enable this behavior, set this.ormSettings.logSQL
to true
in your Application.bx
:
These SQL statements will also log to the orm.log
file located in ${boxlang-home}/logs
.
Hibernate-native logging statements will also be captured in the orm.log
file located in ${boxlang-home}/logs
.