quetwo
03/12/2024, 5:58 PMquetwo
03/12/2024, 5:58 PMbdw429s
03/12/2024, 6:38 PMlmajano
03/13/2024, 9:22 AMmborn
03/13/2024, 10:07 AMERROR log level.
2. For the Lucee Hibernate extension, it depends on your version of Lucee - specifically, on whether you're on Log4J 2 or not.
a. For log4j 1.x, you can use this code to redirect the Hibernate logs to the server console: https://github.com/coldbox-modules/cborm/blob/0454a20a64dfd0218e8cfa810b2582ec877eebaf/models/util/ORMUtilSupport.cfc#L17-L42
b. For log4j 2.x, good luck my friend. 🙂 I was never able to figure out how to capture and redirect Hibernate's logs to the server console. If do you figure it out, please do let us know the config and we can add it in our docs. If not, I would suggest sponsoring a log4j expert such as @bdw429s to get this working for you.quetwo
03/13/2024, 12:21 PMlogSQL directive in the ormSettings (on the application scope), it is not logging. I can try and see if I can generate logs for this, but I don't don't think I've ever seen any -- even on db connect issues. Logging the attempted queries is a great debugging tool, esp if you are doing your own HQL and trying to figure out why Lucee/Hibernate is giving unexpected results -- and it is listed as a valid configuration item : https://orm-extension.ortusbooks.com/getting-started/configurationquetwo
03/13/2024, 12:22 PMmborn
03/13/2024, 3:42 PMmborn
03/13/2024, 3:43 PMmborn
03/13/2024, 3:44 PMquetwo
03/13/2024, 8:29 PMquetwo
03/13/2024, 8:30 PMmborn
03/14/2024, 12:03 AMthis.ormSettings.logSQL.
https://github.com/Ortus-Solutions/extension-hibernate/releases/tag/v6.0.0mborn
03/14/2024, 12:04 AMmborn
03/14/2024, 12:04 AMquetwo
03/15/2024, 11:53 PMcomponent
{
this.name="test";
this.datasource="ormtest";
this.ormEnabled=true;
this.ormSettings=
{
logSQL:true,
cfclocation="db",
dbcreate="update"
};
}
db/configItem.cfc:
component persistent="true" table="appConfig" cacheUse="nonstrict-read-write"
{
// This ORM component is ued to store application variables in the database.
property name="id" fieldtype="id" generator="native" column="configID";
property name="name" fieldtype="column" ormType="string" column="configItem";
property name="value" fieldtype="column" ormType="string" column="configValue";
}
test.cfm:
<cfscript>
ormReload();
test = EntityLoad("configItem");
</cfscript>
<cfdump var="#test#">
box.json:
{
"dependencies": {
"D062D72F-F8A2-46F0-8CBC91325B2F067B": "^6.5.2"
}
}quetwo
03/15/2024, 11:54 PMquetwo
03/15/2024, 11:57 PMmborn
03/16/2024, 2:56 AMmborn
03/16/2024, 2:56 AMmborn
03/16/2024, 3:01 AMquetwo
03/16/2024, 5:33 AMserver log function).
As it is working now, how would I expect to see that output?mborn
03/16/2024, 10:52 AMserver log.mborn
03/16/2024, 11:00 AMmborn
03/16/2024, 11:01 AMorm.log file. I can hopefully have a fix for this within the month, @quetwo. Right now client work / sponsored development is getting the priority. Sorry about the wait.mborn
03/16/2024, 11:06 AMquetwo
03/16/2024, 5:17 PM