このコンテンツは選択した言語では利用できません。

Chapter 12. Checking Session Logs


You can check the session logs in the audit log, which is a log of all events that were logged from the session. Audit log is an XML-based log file which contains a log of all the events that occurred while executing a specific ksession.

Procedure: Creating Logger

  1. To create a logger, use KieServices and attach the logger to a ksession, for example:

    KieRuntimeLogger logger = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "mylogfile", 1000);
    // Do something with the ksession here.
    logger.close();
  2. Do not forget to close the logger when you finish using it.

Procedure: Using Audit View

  1. To use Audit View, open Window Show View Other…​.
  2. Under the Drools category, select Audit.
  3. To open a log file in Audit View, select the log file using the Open Log action in the top right corner, or simply drag and drop the log file from the Package Explorer or Navigator into the Audit View.
  4. A tree-based view is generated based on the data inside the audit log. Depicted below is an example tree-based view:

    Figure 12.1. Tree-Based View

    An example tree-based view for Audit log.
  5. An event is shown as a subnode of another event if the child event is caused by a direct consequence of the parent event.
File-Based Logger

The file-based logger will only save the events on close (or when a certain threshhold is reached). If you want to make sure the events are saved on a regular interval (for example during debugging), make sure to use a threaded file logger, so the audit view can be updated to show the latest state. When creating a threaded file logger, you can specify the interval after which events should be saved to the file (in milliseconds).

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.