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> <configuration>
<configSections> <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> </configSections>
<!-- Connection strings --> <!-- Connection strings -->
<connectionStrings> <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> </connectionStrings>
<appSettings> <appSettings>
<!-- Encryption util settings --> <!-- Encryption util settings -->
<add key="WebsitePanel.CryptoKey" value="1234567890" /> <add key="WebsitePanel.CryptoKey" value="1234567890"/>
<!-- A1D4KDHUE83NKHddF --> <!-- A1D4KDHUE83NKHddF -->
<add key="WebsitePanel.EncryptionEnabled" value="true" /> <add key="WebsitePanel.EncryptionEnabled" value="true"/>
<!-- Web Applications --> <!-- Web Applications -->
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" /> <add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications"/>
<!-- Communication settings --> <!-- Communication settings -->
<!-- Maximum waiting time when sending request to the remote server <!-- Maximum waiting time when sending request to the remote server
The value is in seconds. "-1" - infinite. --> The value is in seconds. "-1" - infinite. -->
<add key="WebsitePanel.EnterpriseServer.ServerRequestTimeout" value="3600" /> <add key="WebsitePanel.EnterpriseServer.ServerRequestTimeout" value="3600"/>
<add key="WebsitePanel.AltConnectionString" value="ConnectionString" /> <add key="WebsitePanel.AltConnectionString" value="ConnectionString"/>
<add key="WebsitePanel.AltCryptoKey" value="CryptoKey" /> <add key="WebsitePanel.AltCryptoKey" value="CryptoKey"/>
</appSettings> </appSettings>
<system.web> <system.web>
<!-- Disable any authentication --> <!-- Disable any authentication -->
<authentication mode="None" /> <authentication mode="None"/>
<!-- Correct HTTP runtime settings --> <!-- Correct HTTP runtime settings -->
<httpRuntime executionTimeout="3600" maxRequestLength="16384" /> <httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
<!-- Set globalization settings --> <!-- 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 --> <!-- Web Services settings -->
<webServices> <webServices>
<protocols> <protocols>
<remove name="HttpPost" /> <remove name="HttpPost"/>
<remove name="HttpPostLocalhost" /> <remove name="HttpPostLocalhost"/>
<remove name="HttpGet" /> <remove name="HttpGet"/>
</protocols> </protocols>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3" /> <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
</webServices> </webServices>
<compilation targetFramework="4.0" /> <compilation targetFramework="4.0" debug="true"/>
</system.web> </system.web>
<!-- WSE 3.0 settings --> <!-- WSE 3.0 settings -->
<microsoft.web.services3> <microsoft.web.services3>
<diagnostics> <diagnostics>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" /> <trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
</diagnostics> </diagnostics>
<messaging> <messaging>
<maxMessageLength value="-1" /> <maxMessageLength value="-1"/>
<mtom clientMode="On" /> <mtom clientMode="On"/>
</messaging> </messaging>
<security> <security>
<securityTokenManager> <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> </securityTokenManager>
</security> </security>
<policy fileName="WsePolicyCache.Config" /> <policy fileName="WsePolicyCache.Config"/>
</microsoft.web.services3> </microsoft.web.services3>
</configuration> </configuration>

View file

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