簡體   English   中英

如何從 Quarkus 中的 sql 獲取日志結果?

[英]How to get log result from sql in Quarkus?

我想從 HQL 中得到結果並顯示出來。 我嘗試搜索但沒有找到相關文章

Hibernate: 
    select
        customer0_.id as id1_5_,
        customer0_.CREATE_TIME as create_t2_5_,
        customer0_.CREATE_TIME_UNIX as create_t3_5_,
        customer0_.UPDATE_TIME as update_t4_5_,
        customer0_.UPDATE_TIME_UNIX as update_t5_5_,
        customer0_.business_registration_number as business6_5_,
        customer0_.company as company7_5_,
        customer0_.country as country8_5_,
        customer0_.currency as currency9_5_,
        customer0_.description as descrip10_5_,
        customer0_.email as email11_5_,
        customer0_.mobile as mobile12_5_,
        customer0_.name as name13_5_,
        customer0_.status as status14_5_,
        customer0_.telephone as telepho15_5_ 
    from
        customer customer0_ 
    where
        customer0_.email=? limit ?
{"timestamp":"2022-12-22T11:10:13.753+07:00","sequence":3029,"loggerClassName":"org.jboss.logging.Logger","loggerName":"com.secui.filters.LoggingInterceptor","level":"INFO","message":"Result: com.secui.models.Customer","threadName":"executor-thread-0","threadId":272,"mdc":{},"ndc":"","hostName":"thaonv","processName":"quarkus1-dev.jar","processId":19940}

期待它顯示:在此處輸入圖像描述

您可以在 application.properties 中添加以下內容 quarkus.log.category."org.hibernate".level=DEBUG

這將使您能夠查看查詢、傳遞的參數以及結果。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM