[DBFLUTE-252] {C#}: 実行ステータスログにおいて呼び出し元情報を出力する Created: 2008-05-12 Updated: 2008-09-25 Resolved: 2008-09-22 |
|
| Status: | Closed |
| Project: | DBFlute |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | jflute | Assignee: | jflute |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Java版において、例えばDBアクセスが、 AaaPage → BbbService → XxxBhv というような順序で呼び出された場合、 ====================================== XxxBhv.selectList() ============== AaaPage.initialize():23 --> BbbService.select():58 --> ... C#版でもこうなるようにしたい。 【タスク】 <A> <B> <C> |
| Comments |
| Comment by jflute [ 2008-09-22 ] |
|
テストケースの環境が特別かもしれないので、 |
| Comment by jflute [ 2008-09-22 ] |
|
> B. インナークラスがStackTraceに含まれない |
| Comment by jflute [ 2008-09-22 ] |
|
おおよそできたが、Javaとは違う面もあるので今後微調整が必要かもしれない。 A. Type.NameがNamespaceを含まない |
| Comment by jflute [ 2008-09-22 ] |
|
Behaviorクラス名などの探し方はJavaと同じにする。 |
| Comment by jflute [ 2008-09-22 ] |
|
デバッグ情報の有無に関わらず動作するようなプログラミングをしたい。 StackTrace st = new StackTrace(); for (int i = 0; i < st.FrameCount; i++) { MethodBase method = sf.GetMethod(); if (method == null) { break; // End } ... } |
| Comment by jflute [ 2008-05-29 ] |
|
おおおお、ありがとうございます。 |
| Comment by Anonymous [ 2008-05-28 ] |
|
StackTrace st = new StackTrace(); . {1}File: {2}Line: {3}", method.DeclaringType.Name, method.Name, sf.GetFileName(), sf.GetFileLineNumber())); |