SAP Cloud for Customer Cloud Application Studio的Trace功能
You can activate tracing on any system that you can log on to with your developer user account. When a trace is
active, script files are logged as they are executed, and methods from the Trace class are evaluated and
recorded.
當trace激活后,script files被執行時,其執行明細會被記錄下來。
The Trace class provides methods to record informational messages (Trace.Info) and error
messages (Trace.Error).
You can activate tracing for a business user. When tracing has been activated for a business user, the code that
is executed by that user is traced. Because tracing is a developer feature, business users cannot enable tracing
directly.
Business User無法為自己激活Trace,因為其無法登陸Cloud Application Studio. 但是Development User可以為某Business User激活trace,當該Business User執行代碼時,script執行會被記錄下來。
When you have started tracing, some information is traced automatically, including the identity of each script file that is executed, and the time taken by the script file to execute.
當trace被激活時,某些信息會自動被記錄下來,包括執行script文件的用戶id,和執行時間。
You can enhance the information that is recorded during a trace by adding methods from the Trace class to your script files. This way, you can record informational and error messages, and output variable values.
應用開發人員可以通過ABSL namespace下的Trace類提供的info或者error方法,記錄更多的信息。
Local Trace的含義:
Local traces are the traces that are created when you start tracing on the system that you are logged on with your developer user account. You can use local traces to evaluate code that is in development, or to investigate
issues that have been reproduced on a local system.
Local trace for development users
When you start tracing, the script files that you run under your developer user account are recorded and
the methods from the Trace class are evaluated and recorded.
Local trace for business users
You can configure tracing to record the actions of a business user instead of tracing the actions performed
under your developer user account. This enables you to observe workflows that are performed by a business user in the cloud solution. Business users cannot activate tracing directly because tracing is a developer feature that is accessed only in the studio. When you run a trace for a business user, the script files and the trace statements in the code that are executed by the business user are evaluated and recorded.
SAP Cloud for Customer的Trace方法對運行時性能有無影響?
Trace information is only recorded while an active trace is running. When tracing is not active, no system resources are allocated for tracing. The methods from the Trace class are only evaluated when a trace is active; therefore you can include them in your script files without incurring any performance penalty during the course of regular operation.
Trace.info, Trace.error此類方法,如果trace未處于激活狀態,根本不會得到執行,因此即使在script file里使用Trace類,對性能也不會有影響。
Tracing is automatically stopped if it is left running.
script file執行完畢之后,trace自動停止。
總結
以上是生活随笔為你收集整理的SAP Cloud for Customer Cloud Application Studio的Trace功能的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IOS中一段文字设置多种字体颜色代码
- 下一篇: v网包月费是什么意思