Can you disable log file on client side?

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

Moderator: uasdknet

Post Reply
m.kumali
Full Member
Full Member
Posts: 5
Joined: 20 Oct 2020, 12:55

Can you disable log file on client side?

Post by m.kumali »

Dear UA Support,

We noticed upon connection UA SDK creates .log.txt file in User\%Appdata%\*\UnifiedAutomation.

Our customer requested we do not create this file.
Can this be disabled from Client side?
These logs can also be seen in Debug console.
example:
12:39.33|0004|02|4|SendPublish=False due to known error ('BadTooManyPublishRequests')

Thank you in advance!

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

Re: Can you disable log file on client side?

Post by Support Team »

Hello,

The mentioned file is the trace file from the sdk. The tracing can be enabled and disabled by the configuration of the application. If application settings are not set (either in code or via app.config), a default configuration is used. In this default configuration the trace is enabled.

We strongly recommend to create an own configuration for your application, since the default configuration contains some UnifiedAutomation specific information. Custom configurations are set in each example of the sdk.

The SendPublish=False trace indicates that the client tries to send more PublishRequests to the server than the server accepts. The client will automatically reduce this number with each BadTooManyPublishRequests message by the server. So if this trace can only be seen a few times in the trace, you can ignore this trace.
Best regards
Unified Automation Support Team

m.kumali
Full Member
Full Member
Posts: 5
Joined: 20 Oct 2020, 12:55

Re: Can you disable log file on client side?

Post by m.kumali »

Hello again,

Thank you very much for your reply!
I tried what you suggested.

I set:

m_TraceSettings.MasterTraceEnabled = false;
m_TraceSettings.DefaultTraceLevel = UnifiedAutomation.UaSchema.TraceLevel.None;
m_TraceSettings.MaxEntriesPerLog = 1;
m_TraceSettings.MaxLogFileBackups = 1;
m_TraceSettings.FastTrace = false;
m_TraceSettings.TraceFile = null;
m_application.ApplicationSettings.Set(m_TraceSettings);

Before calling session.Connect();

File still gets created and trace is still recorded as well as seen in Console.
I tried setting in App.Config as from your examples. Same result.
What am I missing?

Greetings!

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

Re: Can you disable log file on client side?

Post by Support Team »

Hello,

all settings have to be set before ApplicationInstance.Start() is called. You cannot change the settings while its running.
Best regards
Unified Automation Support Team

Post Reply