Skip to content

logで表示するスタックトレースのrecentはmaxTraceSizeを超えないようにする #400

Closed

Description

@fukudayasuo

maxTraceSizeに3以下の数値を設定した場合でも今の実装だとlogObj.stackTrace.recentに3件分のスタックトレースが格納されている。
(logObjはログターゲットのlog関数に渡される引数。デフォルトのログターゲットを使用した場合はコンソールログの1行目に表示される)

// log.maxStackSize = 2 の場合
 [DEBUG]11:15:11,240: msg  [{func1}() <- {func2}() <- {func3}() ...] 
 {func1}()
  {func2}() 

recentは、トレース結果の省略表示を目的としたプロパティとして扱うこととし、maxTraceSizeを超えたトレース結果にはならないように修正する。

Activity

  1. added this to the v1.1.13 milestone on Aug 22, 2014
  2. fukudayasuo commented on Aug 22, 2014

    @fukudayasuo
    Author

    recentは、トレース結果の省略表示を目的としたプロパティとして扱うこととし、maxTraceSizeを超えたトレース結果にはならないように修正する。

    省略表示を目的としたプロパティなので、プロパティ名をrecentではなく、previewに変更する。

  3. added a commit that references this issue on Aug 22, 2014
  4. added a commit that references this issue on Aug 22, 2014
  5. added a commit that references this issue on Aug 22, 2014
  6. fukudayasuo commented on Aug 22, 2014

    @fukudayasuo
    Author

    8c9ae8e のコミットで{root}の場合と{anonymas}の場合のスタックトレースでエラーが出てしまっていました。
    7a4945e で修正しました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions