Last time, I spent half a day trying to record K2 framework logs. Intentionally written errorsCode, Tracking debugging,
Logger. error (string. format ("{0}-[message: {1}] [Stack: {2}] [Class Name: {3}] [method: {4}] [object: {5}] ", argmsg, argex. message, argex. stacktrace, argex. targetsite. declaringtype. fullname, argex. targetsite. name, argex. source); the Code is successfully executed, but the log cannot be found.
In the same way, logs can be found at the web layer.
Later, we found that the configuration of the K2 service is missing:
<Configsections>
<Section name = "Dahan. config" type = "Dahan. config. configurationhandler, Dahan"/>
<! -- ================== Log4net configuration s =================================-->
<Section name = "log4net" type = "log4net. config. log4netconfigurationsectionhandler, log4net"/>
<! -- ================== Log4net configuration e =================================-->
<Section name = "secauthenticate" type = "secauthenticatemodule. secauthenticateconfig"/>
</Configsections>