How to have multiple log/trace files?

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
dalquijada23
Jr. Member
Jr. Member
Posts: 2
Joined: 01 Jun 2022, 21:42

How to have multiple log/trace files?

Post by dalquijada23 »

Is it possible to have multiple trace files in a client app?

For example: one for regular data/info trace entry logs and a second file only for error trace entry logs.

I know that when loading TraceSettings for ApplicationSettings we can define a TraceFile and TraceModules but i want to know if we can have multiple TraceFiles with specific TraceModules for each one.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: How to have multiple log/trace files?

Post by Support Team »

Hello,

you can only create one trace file. Generating multiple trace files with different TraceLevels is not supported.

However you can create a trace file filter it for the trace file manually.
Best regards
Unified Automation Support Team

dalquijada23
Jr. Member
Jr. Member
Posts: 2
Joined: 01 Jun 2022, 21:42

Re: How to have multiple log/trace files?

Post by dalquijada23 »

Hello, thanks for the quick reply.

But sorry, i don't think i understood that last part. Could you explain it a bit more?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: How to have multiple log/trace files?

Post by Support Team »

Hi,

the trace file contains lot of information and (in most cases) you need the time based sequence of operations to analyze what happened in the server. However the trace contains "TraceLevel" and "ThreadID" and (in theory) you could write yourself a filter (RegEx) to post-process on the trace file.

E.g.: grep all lines where trace level is "6" and pipe to new file.
Best regards
Unified Automation Support Team

Post Reply