| 15747 |
anikendra |
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 |
|
|
|
15 |
using System;
|
|
|
16 |
using System.Net;
|
|
|
17 |
using System.Windows;
|
|
|
18 |
using System.Windows.Controls;
|
|
|
19 |
using System.Windows.Documents;
|
|
|
20 |
using System.Windows.Ink;
|
|
|
21 |
using System.Windows.Input;
|
|
|
22 |
using System.Windows.Media;
|
|
|
23 |
using System.Windows.Media.Animation;
|
|
|
24 |
using System.Windows.Shapes;
|
|
|
25 |
using System.Diagnostics;
|
|
|
26 |
|
|
|
27 |
namespace 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 |
}
|