I would like to save everything in a log file and receive mails containing 512 messages per mail.
RollingFileAppender works fine. But in emails I receive sometimes 1 message in mail, sometimes 4 messages (not the same ones).
I tried MemoryAppender too. There I have also 1-2 messages in queue, nothing more.
I tried "lossy" SmtpAppender, the result is same. What should I change?
My configuration is here
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="c:\temp\log-" />
<bufferSize value="0" />
<appendToFile value="true" />
<rollingStyle value="Composite" />
<param name="DatePattern" value="yyyy.MM.dd'.log'" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="10MB" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level - %message%newline" />
</layout>
</appender>
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<bufferSize value="512" />
<lossy value="false" />
<authentication value="Basic" />
<to value="test#test.com" />
<from value="test#test.com" />
<username value="test#test.com" />
<password value="xxxxx" />
<subject value="My subject" />
<smtpHost value="mail.test.com" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="RollingLogFileAppender" />
<appender-ref ref="SmtpAppender" />
</root>
</log4net>
The following appender config works for me (I get 6 log messages at a time):
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="name#server.com" />
<from value="name#server.com" />
<subject value="Log Email" />
<smtpHost value="email.test.com" />
<bufferSize value="5" />
<lossy value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{log4net:HostName} :: %date %level %logger [%thread] - %message%newline" />
</layout>
</appender>
Do your log messages have multiple lines perhaps?
Related
I have created an excel custom function with a shared runtime environment. It's working fine in the desktop app, but when I run the same project on the server it's not working. My excel function is not working online. I don't know why its behavior change in an online environment.
Can anyone tell me why I am getting making mistakes?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>a1753eec-7c8b-4dbd-ab74-3b30d63d9b15</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Contoso" />
<Description DefaultValue="Write your own Excel functions in JavaScript." />
<IconUrl DefaultValue="https://localhost:3000/assets/lock.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/lock.png" />
<SupportUrl DefaultValue="https://www.contoso.com/help" />
<AppDomains>
<AppDomain>https://localhost:3000</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="SharedRuntime" MinVersion="1.1" />
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<Runtimes>
<Runtime resid="Taskpane.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="Functions.Script.Url" />
</Script>
<Page>
<SourceLocation resid="Taskpane.Url" />
</Page>
<Metadata>
<SourceLocation resid="Functions.Metadata.Url" />
</Metadata>
<Namespace resid="Functions.Namespace" />
</ExtensionPoint>
</AllFormFactors>
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title" />
<Description resid="GetStarted.Description" />
<LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
</GetStarted>
<FunctionFile resid="Taskpane.Url" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="TabAddIns">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label" />
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
</Group>
<Label resid="TaskpaneButton.Label" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/lock.png" />
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/lock.png" />
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/lock.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/dist/functions.js" />
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/dist/functions.json" />
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/dist/functions.html" />
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="contoso" />
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="CommandsGroup.Label" DefaultValue="Get help" />
<bt:String id="TaskpaneButton.Label" DefaultValue="Login" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
I know this question has been asked many, many times online. I've run out of luck trying everything there is.
I'm trying to POST data to a server and get back a simple response.
Obviously I would need to install the cordova whitelist plugin to achieve accessing external sources from the app, so I installed it.
The error I get back is:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
Project Info:
This is an Onsen UI app
Cordova CLI 6.5.0
Android Version 6.1.2
Installed Plugins:
cordova-plugin-compat#1.1.0
cordova-plugin-file#~4.3.2
cordova-plugin-splashscreen#4.0.2
cordova-plugin-camera#2.4.0
cordova-plugin-whitelist#1.3.3-dev
Meta Tag:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
Tools I'm using:
Windows 10,
Visual Studio 2015
What I have done:
Uninstalled and Reinstalled the Whitelist plugin, using Visual
Studio
Uninstalled the plugin and reinstalled via Cordova CLI
cordova plugin add cordova-plugin-whitelist
Uninstalled and reinstalled plugin via Github
I've even updated Cordova to 6.5.0 from 6.2.0
I created a simple GET request to see if it works and still nothing works.
Cleared the Cordova Cache in Visual Studio.
Javascript code I used:
$http({
method: 'GET', url: "http://mywebsite.com/simple_get.php"
}).then(
function (response) {
alert(JSON.stringify(response));
},
function (response) {
alert(JSON.stringify(response));
}
);
jQuery Code also tried:
var settings = {
"async": true,
"crossDomain": true,
"url": "http://mywebsite.com/demo.php",
"method": "GET",
"headers": {
"content-type": "application/x-www-form-urlencoded",
"cache-control": "no-cache"
},
"data": {}
}
jQuery.ajax(settings).done(function (response) {
console.log(response);
});
I have no idea how to debug anymore and get to the problem, any help would be greatly appreciated... This is the final step for my app to be done :(
Thanks
This is my config.xml
<?xml version="1.0" encoding="utf-8"?>
<widget id="au.com.myapp" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps">
<name> MyApp</name>
<description>fancy user interfaces for hybrid mobile applications. It uses uses Apache Cordova to help you build an app that targets multiple mobile platforms: Android, iOS, Windows, and Windows Phone.</description>
<author email="admin#myappdomain.com" href="http://myappdomain.com">Author</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="*" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<vs:features />
<preference name="windows-target-version" value="8.1" />
<preference name="windows-phone-target-version" value="8.1" />
<preference name="DisallowOverscroll" value="true" />
<preference name="Orientation" value="portrait" />
<preference name="loglevel" value="DEBUG" />
<preference name="AndroidLaunchMode" value="singleTop" />
<preference name="ErrorUrl" value="" />
<preference name="Fullscreen" value="True" />
<preference name="KeepRunning" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="20000" />
<preference name="FadeSplashScreen" value="false" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="EnableViewportScale" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="GapBetweenPages" value="0" />
<preference name="PageLength" value="0" />
<preference name="PaginationBreakingMode" value="page" />
<preference name="PaginationMode" value="unpaginated" />
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<preference name="UIWebViewDecelerationSpeed" value="normal" />
<preference name="monaca:AndroidIsPackageNameSeparate" value="false" />
<preference name="monaca:targetFamilyiPhone" value="1" />
<preference name="monaca:targetFamilyiPad" value="1" />
<platform name="android">
<icon density="ldpi" src="resources/android/icon/drawable-ldpi/icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi/icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi/icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi/icon.png" />
</platform>
<platform name="android">
<splash density="land-hdpi" src="resources/android/drawable-land-hdpi/screen.png" />
<splash density="land-ldpi" src="resources/android/drawable-land-ldpi/screen.png" />
<splash density="land-mdpi" src="resources/android/drawable-land-mdpi/screen.png" />
<splash density="land-xhdpi" src="resources/android/drawable-land-xhdpi/screen.png" />
<splash density="port-hdpi" src="resources/android/drawable-port-hdpi/screen.png" />
<splash density="port-ldpi" src="resources/android/drawable-port-ldpi/screen.png" />
<splash density="port-mdpi" src="resources/android/drawable-port-mdpi/screen.png" />
<splash density="port-xhdpi" src="resources/android/drawable-port-xhdpi/screen.png" />
</platform>
<platform name="ios">
<splash height="480" src="res/screen/ios/Default~iphone.png" width="320" />
<splash height="960" src="res/screen/ios/Default#2x~iphone.png" width="640" />
<splash height="1024" src="res/screen/ios/Default-Portrait~ipad.png" width="768" />
<splash height="2048" src="res/screen/ios/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<splash height="1536" src="res/screen/ios/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="1136" src="res/screen/ios/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="res/screen/ios/Default-667h.png" width="750" />
<splash height="2208" src="res/screen/ios/Default-736h.png" width="1242" />
<splash height="1242" src="res/screen/ios/Default-Landscape-736h.png" width="2208" />
<splash src="res/screen/ios/Default#2x~universal~anyany.png" />
<splash src="res/screen/ios/Default#2x~universal~comany.png" />
<splash src="res/screen/ios/Default#2x~universal~comcom.png" />
<splash src="res/screen/ios/Default#3x~universal~anyany.png" />
<splash src="res/screen/ios/Default#3x~universal~anycom.png" />
<splash src="res/screen/ios/Default#3x~universal~comany.png" />
</platform>
<plugin name="cordova-plugin-camera" spec="~2.4.0" />
<plugin name="cordova-plugin-compat" version="1.1.0" />
<plugin name="cordova-plugin-file" spec="~4.3.2" />
<plugin name="cordova-plugin-inappbrowser" version="1.7.0" />
<plugin name="cordova-plugin-splashscreen" version="4.0.2" />
<plugin name="cordova-plugin-whitelist" version="1.3.2" />
</widget>
Edit 2:
Try this code anywhere above the Ajax function.
$(document).ajaxError(function(e, jqxhr, settings, exception) {
if (jqxhr.readyState == 0 || jqxhr.status == 0) {
return;
}
});
This will catch the status 0 error and allow jQuery to ignore it and continue with the Ajax request.
Use it just for debugging purposes.
Edit
Try the following.
$.ajax({
url: 'YourRestEndPoint',
headers: {'yourHeaderKey': 'yourHeaderValue',
'yourHeaderKey2': 'yourHeaderValue2'},
method: 'POST',
data: {},
success: function(data){
console.log('succes: '+data);
},
error: function (jqXHR, textStatus, errorThrown){
console.log(jqXHR + " " + textStatus + " " + errorThrown);
console.log(jqXHR.status);
}
});
This should log errors a bit better.
I see from your question you are trying to POST data to the server, however in the code you use a GET request. Does the endpoint accept both POST and GET or just POST.
Original
If your are having a 'Name Not Resolved' error have you ensured the URL is correct? Are you running the endpoint on a server you have control over? Is it hosted by you or a third party? Is there a problem with your DNS lookup? If you try a known working endpoint does the same code work correctly?
Could be caused by a lot or various factors.
The whitelist plugin should automatically be installed on the latest version of Cordova.
Long story short, I'm using Log4net and I want to write inside into the DB calling a Stored Procedure. Here is the setting in the web.config:
<log4net debug="true">
<root>
<level value="ALL" />
<appender-ref ref="AdoNetAppender" />
<appender-ref ref="RollingLogFileAppender" />
</root>
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<threshold value="ALL"/>
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=***;initial catalog=***;user id=**;password=***;MultipleActiveResultSets=True;" />
<commandText value="iE_AddUserActivityLog" />
<commandType value="StoredProcedure" />
<parameter>
<parameterName value="#log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.RawTimeStampLayout" />
</parameter>
<parameter>
<parameterName value="#thread" />
<dbType value="AnsiString" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%thread" />
</layout>
</parameter>
<parameter>
<parameterName value="#log_level" />
<dbType value="AnsiString" />
<size value="50" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level" />
</layout>
</parameter>
<parameter>
<parameterName value="#logger" />
<dbType value="AnsiString" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger" />
</layout>
</parameter>
<parameter>
<parameterName value="#page" />
<dbType value="AnsiString" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{page}" />
</layout>
</parameter>
<parameter>
<parameterName value="#host" />
<dbType value="AnsiString" />
<size value="50" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{host}" />
</layout>
</parameter>
<parameter>
<parameterName value="#ipaddress" />
<dbType value="AnsiString" />
<size value="15" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{ipaddress}" />
</layout>
</parameter>
<parameter>
<parameterName value="#browser" />
<dbType value="AnsiString" />
<size value="15" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{browser}" />
</layout>
</parameter>
<parameter>
<parameterName value="#platform" />
<dbType value="AnsiString" />
<size value="15" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{platform}" />
</layout>
</parameter>
<parameter>
<parameterName value="#device" />
<dbType value="AnsiString" />
<size value="15" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{device}" />
</layout>
</parameter>
<parameter>
<parameterName value="#message" />
<dbType value="AnsiString" />
<size value="4000" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message" />
</layout>
</parameter>
<parameter>
<parameterName value="#exception" />
<dbType value="AnsiString" />
<size value="2000" />
<layout type="log4net.Layout.ExceptionLayout" />
</parameter>
</appender>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs\log.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
</log4net>
Can someone help me here to understand why I cannot use the commandType? Because if I use either:
<commandText value="INSERT INTO user_activity_log ([Date],[Thread],[Level],[Logger],[page],[host],[browser],[platform],[device],[ipaddress],[Message],[Exception]) VALUES (#log_date, #thread, #log_level, #logger, #page, #host, #browser, #platform, #device, #ipaddress, #message, #exception)" />
or:
<commandText value="exec iE_AddUserActivityLog #log_date, #thread, #log_level, #logger, #page, #host, #browser, #platform, #device, #ipaddress, #message, #exception" />
I can see that is writing.
UPDATE: I've also tried to introduce the DBO prefix, in this way:
<commandText value="dbo.iE_AddUserActivityLog" />
<commandType value="StoredProcedure" />
Ok, I was to able to solve it. But I'm not sure why. Basically, I needed to rename the some parameters in the web.config, in order to match with the same name that I have in my Stored Procedure.
I know that the question has been asked before but I can't find any workaround...
I am trying to get a file thanks to PhoneGap File feature, so I took the example on their documentation website, and get the above error.
This is my code :
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
}
function gotFS(fileSystem) {
fileSystem.root.getFile("toto.txt", null, gotFileEntry, fail);
}
function gotFileEntry(fileEntry) {
fileEntry.file(gotFile, fail);
}
function gotFile(file){
readDataUrl(file);
readAsText(file);
}
function readDataUrl(file) {
var reader = new FileReader();
reader.onloadend = function(evt) {
console.log("Read as data URL");
console.log(evt.target.result);
};
reader.readAsDataURL(file);
}
function readAsText(file) {
var reader = new FileReader();
reader.onloadend = function(evt) {
console.log("Read as text");
console.log(evt.target.result);
};
Ext.Msg.alert('toto',reader.readAsText(file), Ext.emptyFn);
}
function fail(error) {
Ext.Msg.alert('error',error.code, Ext.emptyFn);
}
Here is my config.xml file :
<feature name="http://api.phonegap.com/1.0/device" />
<preference name="permissions" value="none" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<feature name="File">
<param name="android-package" value="org.apache.cordova.file" />
</feature>
<icon src="icon.png" />
<icon gap:density="ldpi" gap:platform="android" src="res/icon/android/icon-36-ldpi.png" />
<icon gap:density="mdpi" gap:platform="android" src="res/icon/android/icon-48-mdpi.png" />
<icon gap:density="hdpi" gap:platform="android" src="res/icon/android/icon-72-hdpi.png" />
<icon gap:density="xhdpi" gap:platform="android" src="res/icon/android/icon-96-xhdpi.png" />
<icon gap:platform="blackberry" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="blackberry" gap:state="hover" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="ios" height="57" src="res/icon/ios/icon-57.png" width="57" />
<icon gap:platform="ios" height="72" src="res/icon/ios/icon-72.png" width="72" />
<icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" />
<icon gap:platform="ios" height="144" src="res/icon/ios/icon-72-2x.png" width="144" />
<icon gap:platform="webos" src="res/icon/webos/icon-64.png" />
<icon gap:platform="winphone" src="res/icon/windows-phone/icon-48.png" />
<icon gap:platform="winphone" gap:role="background" src="res/icon/windows-phone/icon-173.png" />
<gap:splash gap:density="ldpi" gap:platform="android" src="res/screen/android/screen-ldpi-portrait.png" />
<gap:splash gap:density="mdpi" gap:platform="android" src="res/screen/android/screen-mdpi-portrait.png" />
<gap:splash gap:density="hdpi" gap:platform="android" src="res/screen/android/screen-hdpi-portrait.png" />
<gap:splash gap:density="xhdpi" gap:platform="android" src="res/screen/android/screen-xhdpi-portrait.png" />
<gap:splash gap:platform="blackberry" src="res/screen/blackberry/screen-225.png" />
<gap:splash gap:platform="ios" height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />
<gap:splash gap:platform="winphone" src="res/screen/windows-phone/screen-portrait.jpg" />
<access origin="http://127.0.0.1*" />
I tried installing the cordova file plugin with the phonegap CLI, which actually succeeded... but any change appearing on my app.
Any idea ?
Thanks a lot!!
ps: I'm using Sencha Touch 2.3.1 with Sencha Cmd to build my app but it probably doesn't change anything since other features like batterystatus or physical button binding work fine...
include following in your Config.xml
<feature name="http://api.phonegap.com/1.0/file" />
<feature name="File">
<param name="android-package" value="org.apache.cordova.file.FileUtils" />
</feature>
<feature name="FileTransfer">
<param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
</feature>
<feature name="Storage">
<param value="org.apache.cordova.Storage" name="android-package"/>
</feature>
I am currently looking for some code or a tool/service that allows me to store Log4Net Messages in a SQL Server database. Does something like this already exist or would I have to implement this on my own? I couldn't find anything on SO or Google.
Thanks in advance for any information.
You can learn about this in the manual
Also a good blog about problems using log4net with logs saved in a database.
What messes with everyone is copy/paste without knowing the details. Example: <bufferSize value="100" /> That means that it WILL NOT log to database table until it hits 100 entries in the buffer to write to the db table.
For testing/debug set buffer to 1
Notice Window Authentication along with . for local
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" /> <!--Change to 10 or MORE This is critical , after 10 messages then log to database-->
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<!--<connectionString value="data source=[database server];initial catalog=[database name];integrated security=false;persist security info=True;User ID=[user];Password=[password]" />-->
<connectionString value="data source=.;initial catalog=InternTracking;integrated security=true;" />
<commandText value="INSERT INTO InternLog ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (#log_date, #thread, #log_level, #logger, #message, #exception)" />
<commandType value="Text"/>
<!--<commmandText value="dbo.procLog_Insert"/>
<commandType value="StoredProcedure"/>-->
<parameter>
<parameterName value="#log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.RawTimeStampLayout" />
</parameter>
<parameter>
<parameterName value="#thread" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%thread" />
</layout>
</parameter>
<parameter>
<parameterName value="#log_level" />
<dbType value="String" />
<size value="50" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level" />
</layout>
</parameter>
<parameter>
<parameterName value="#logger" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger" />
</layout>
</parameter>
<parameter>
<parameterName value="#message" />
<dbType value="String" />
<size value="4000" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message" />
</layout>
</parameter>
<parameter>
<parameterName value="#exception" />
<dbType value="String" />
<size value="2000" />
<layout type="log4net.Layout.ExceptionLayout" />
</parameter>
</appender>
Next you will use app.config or web.config "root" to have it called
<root>
<level value="DEBUG" />
<!--<appender-ref ref="FileAppender"/>-->
<appender-ref ref="AdoNetAppender"/>
</root>