The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Comos Web REST API

REST-style, HTTP-based API used to interact with COMOS data and to access COMOS features.

Logging¶

Protocol function¶

Protocol or log functions work similarly to COMOS, but you must use bin\Comos.Web.Worker.exe.config and not bin\Comos.exe.config. As this file is located on the server, logging settings can only be changed there.

Protocol function for the web page¶

In both configuration files "<Build-Path>\Web\web.config" and "<Build- Path>\ComosServices\ComosGateway\Hosting\Web.config" the following lines have to be set to active:

<add key="serilog:write-to:File.path" value="D:\Logs\log.txt" />
<add key="serilog:write-to:File.outputTemplate" value="[{Timestamp:o} {Level:u3} {ProcessId:D6} {ThreadId:D6} {MachineName} {ServiceName} {ServiceVersion}] {Message:lj} || {Properties} {NewLine}"/>
<add key="serilog:write-to:Elasticsearch.nodeUris" value="http://localhost:9200"/>
<add key="serilog:write-to:Elasticsearch.indexFormat" value="comosindex-{0:yyyy.MM}"/>-->

And under \<appSettings>:

<add key="serilog:minimum-level" value="Verbose"/>

Warning

Verbose logging should be used with care.