1. NetCommons2 loggerでデバッグログをファイル出力する

投稿日時: 2019/06/02 牟田口

こんにちは。

オープンソース・ワークショップの牟田口です。

 

NetCommons2 にはloggerの仕組みがありますが、初期状態は画面出力のため、ファイル出力されず、インストール時の確認やデバッグ時には不便な場合があります。

そこでloggerの出力をファイル出力に変更する方法を記載します。

 

1. html\webapp\config\global-config.ini を変更

;;DEFAULT_LOGGER = viewDisplayManage
DEFAULT_LOGGER = simpleFile

2. html\webapp\config\define.inc.php の末尾に追記

define('LOG_LEVEL', LEVEL_ERROR);

 

すると、下記ディレクトリにログが出力されます。

html\webapp\logs\maple.log

[2019/06/02 02:23:57] [error] 存在しないコンポーネントが指定されました : dicon://Session - DIContainerInitializer#doValueBeforeParse
[2019/06/02 02:24:53] [error] 存在しないコンポーネントが指定されました : dicon://Session - DIContainerInitializer#doValueBeforeParse
[2019/06/02 02:24:55] [error] 存在しないコンポーネントが指定されました : dicon://Session - DIContainerInitializer#doValueBeforeParse

 

参考になれば幸いです。

 

参考リンク

http://allcreator.net/jo0c73c3b-294/?block_id=294&active_action=journal_view_main_detail&post_id=154&comment_flag=1

https://nc2.netcommons.org/bbjx36jrx-6666/#_6666