final0pro

log 显示 db transaction 开始和结束?

  •  
  •   final0pro · Oct 29, 2015 · 4771 views
    This topic created in 4023 days ago, the information mentioned may be changed or developed.

    最近刚接触 rails ,有时分不清具体什么时候 transaction 开始,什么时候结束。再想有没有什么 log 功能可以开启的。可以在 log 里看见 transaction begin 和 transaction commit , rollback 之类的。

    或者在 database 那块可以看见 log ?

    4 replies  •  2015-12-09 05:42:50 +08:00
    pynix
    pynix
    Dec 9, 2015
    1
    非原子操作
    lightening
    lightening
    Dec 9, 2015
    2
    development 环境下你的本地 terminal 不是会显示数据库操作的吗?
    里面不是有 BEGIN .... COMMIT 或 BEGIN ... ROLLBACK 吗?
    final0pro
    final0pro
    OP
    Dec 9, 2015
    3
    @lightening 没有看见 BEGIN 和 COMMIT ,所以很奇怪。

    但是现在项目还有很多其他大问题,这个先放着了:(
    lightening
    lightening
    Dec 9, 2015
    4
    @final0pro 看看 log_level
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:49 · PVG 04:49 · LAX 12:49 · JFK 15:49
    ♥ Do have faith in what you're doing.