Fixed logging bugs

This commit is contained in:
dev_amdtel 2013-08-15 15:51:12 +04:00
parent 3a4ef2dffc
commit f17301bfc1
2 changed files with 32 additions and 22 deletions

View file

@ -1,58 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3" />
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/>
</configSections>
<!-- Connection strings -->
<connectionStrings>
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<!-- Encryption util settings -->
<add key="WebsitePanel.CryptoKey" value="1234567890" />
<add key="WebsitePanel.CryptoKey" value="1234567890"/>
<!-- A1D4KDHUE83NKHddF -->
<add key="WebsitePanel.EncryptionEnabled" value="true" />
<add key="WebsitePanel.EncryptionEnabled" value="true"/>
<!-- Web Applications -->
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" />
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications"/>
<!-- Communication settings -->
<!-- Maximum waiting time when sending request to the remote server
The value is in seconds. "-1" - infinite. -->
<add key="WebsitePanel.EnterpriseServer.ServerRequestTimeout" value="3600" />
<add key="WebsitePanel.AltConnectionString" value="ConnectionString" />
<add key="WebsitePanel.AltCryptoKey" value="CryptoKey" />
<add key="WebsitePanel.EnterpriseServer.ServerRequestTimeout" value="3600"/>
<add key="WebsitePanel.AltConnectionString" value="ConnectionString"/>
<add key="WebsitePanel.AltCryptoKey" value="CryptoKey"/>
</appSettings>
<system.web>
<!-- Disable any authentication -->
<authentication mode="None" />
<authentication mode="None"/>
<!-- Correct HTTP runtime settings -->
<httpRuntime executionTimeout="3600" maxRequestLength="16384" />
<httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
<!-- Set globalization settings -->
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
<!-- Web Services settings -->
<webServices>
<protocols>
<remove name="HttpPost" />
<remove name="HttpPostLocalhost" />
<remove name="HttpGet" />
<remove name="HttpPost"/>
<remove name="HttpPostLocalhost"/>
<remove name="HttpGet"/>
</protocols>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3" />
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
</webServices>
<compilation targetFramework="4.0" />
<compilation targetFramework="4.0" debug="true"/>
</system.web>
<!-- WSE 3.0 settings -->
<microsoft.web.services3>
<diagnostics>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
</diagnostics>
<messaging>
<maxMessageLength value="-1" />
<mtom clientMode="On" />
<maxMessageLength value="-1"/>
<mtom clientMode="On"/>
</messaging>
<security>
<securityTokenManager>
<add type="WebsitePanel.EnterpriseServer.ServiceUsernameTokenManager, WebsitePanel.EnterpriseServer.Code" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
<add type="WebsitePanel.EnterpriseServer.ServiceUsernameTokenManager, WebsitePanel.EnterpriseServer.Code" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/>
</securityTokenManager>
</security>
<policy fileName="WsePolicyCache.Config" />
<policy fileName="WsePolicyCache.Config"/>
</microsoft.web.services3>
</configuration>

View file

@ -50,12 +50,22 @@ namespace WebsitePanel.Providers.HostedSolution
Log.WriteEnd("{0} {1}", LogPrefix, text);
}
public static void LogInfo(string message)
{
Log.WriteInfo("{0} {1}", LogPrefix, message);
}
public static void LogInfo(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteInfo("{0} {1}", LogPrefix, text);
}
public static void LogWarning(string message)
{
Log.WriteWarning("{0} {1}", LogPrefix, message);
}
public static void LogWarning(string message, params object[] args)
{
string text = String.Format(message, args);