API Support Forum
OEC API > API Support > Missing SetLoggingConfig()
Author Topic: Missing SetLoggingConfig()
(3 messages, Page 1 of 1)
Moderators: VPfau
DBrubaker673
Posts: 55
Joined: Jul 18, 2007


Posted: Mar 12, 2012 @ 05:20 PM             Msg. 1 of 3
The documentation at http://www.openecry.com/api/api/OEC.API.OECClient.SetLoggingConfig.html
says I should be able to access OECClient.Global.SetLoggingConfig(), but in API.DLL 3.5 Visual Studio doesn't see that as a public class. SendOrder() and SubmitAllocationBlocks() are there, but not SetLoggingConfig. Am I missing something simple? Reflector doesn't find it, either.

Thanks,
Dale

Dale
DBrubaker673
Posts: 55
Joined: Jul 18, 2007


Posted: Mar 13, 2012 @ 04:42 AM             Msg. 2 of 3
Okay, I found this class in the latest OEC dll. I am now able to start OEC logging like this.
var loggingConfig = new LoggingConfiguration();
loggingConfig.Level = LogLevel.Transport;
OECClient.Global.SetLoggingConfig(loggingConfig);
Log.Start();

Very nice!

Dale
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Mar 13, 2012 @ 12:53 PM             Msg. 3 of 3
Hello,

Your code is correct, but for best results you can set level to OEC.API.LogLevel.All

Ruslan Kartokhin
Software Developer