arnaucube
arnaucube/commonroutesServerPublic Self-hosted repository
commonroutesServer/www/plugins/cordova-plugin-console/src/wp/DebugConsole.cs
www/plugins/cordova-plugin-console/src/wp/DebugConsole.csRaw
 1/*  
 2	Licensed under the Apache License, Version 2.0 (the "License");
 3	you may not use this file except in compliance with the License.
 4	You may obtain a copy of the License at
 5	
 6	http://www.apache.org/licenses/LICENSE-2.0
 7	
 8	Unless required by applicable law or agreed to in writing, software
 9	distributed under the License is distributed on an "AS IS" BASIS,
10	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11	See the License for the specific language governing permissions and
12	limitations under the License.
13*/
14
15using System;
16using System.Net;
17using System.Windows;
18using System.Windows.Controls;
19using System.Windows.Documents;
20using System.Windows.Ink;
21using System.Windows.Input;
22using System.Windows.Media;
23using System.Windows.Media.Animation;
24using System.Windows.Shapes;
25using System.Diagnostics;
26
27namespace WPCordovaClassLib.Cordova.Commands
28{
29    public class DebugConsole : BaseCommand
30    {
31        public void logLevel(string options)
32        {
33            string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
34            string level = args[0];
35            string msg = args[1];
36
37            if (level.Equals("LOG"))
38            {
39                Debug.WriteLine(msg);
40            }
41            else
42            {
43                Debug.WriteLine(level + ": " + msg);
44            }
45        }
46    }
47}