Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-uwp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
e30847e6
Commit
e30847e6
authored
Oct 14, 2016
by
Nicolas Jager
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal : save debug output to file
Change-Id: Id637ece76a98ad4ad8a45944b1c356cc57f263c9 Tuleap: #1224
parent
6ddd60a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
RingDebug.cpp
RingDebug.cpp
+19
-2
RingDebug.h
RingDebug.h
+5
-1
No files found.
RingDebug.cpp
View file @
e30847e6
...
...
@@ -24,6 +24,7 @@ using namespace RingClientUWP;
using
namespace
Platform
;
using
namespace
Windows
::
UI
::
Core
;
using
namespace
Windows
::
Storage
;
void
RingDebug
::
print
(
const
std
::
string
&
message
,
...
...
@@ -53,5 +54,21 @@ RingDebug::print(const std::string& message,
OutputDebugString
((
wString
+
L"
\n
"
).
c_str
());
/* fire the event. */
messageToScreen
(
ref
new
String
(
wString
.
c_str
(),
wString
.
length
()));
}
\ No newline at end of file
auto
line
=
ref
new
String
(
wString
.
c_str
(),
wString
.
length
());
messageToScreen
(
line
);
FileIO
::
AppendTextAsync
(
_logFile
,
line
+
"
\n
"
);
}
RingClientUWP
::
RingDebug
::
RingDebug
()
{
StorageFolder
^
storageFolder
=
ApplicationData
::
Current
->
LocalFolder
;
StorageFile
^
logFile
;
task
<
StorageFile
^>
(
storageFolder
->
CreateFileAsync
(
"debug.log"
,
CreationCollisionOption
::
ReplaceExisting
)).
then
([
this
](
StorageFile
^
file
)
{
this
->
_logFile
=
file
;
});
}
RingDebug.h
View file @
e30847e6
...
...
@@ -17,6 +17,8 @@
**************************************************************************/
#pragma once
using
namespace
Windows
::
Storage
;
namespace
RingClientUWP
{
...
...
@@ -40,6 +42,8 @@ public:
}
}
property
StorageFile
^
_logFile
;
/* properties */
/* functions */
...
...
@@ -51,7 +55,7 @@ internal:
event
debugMessageToScreen
^
messageToScreen
;
private:
RingDebug
()
{}
;
// singleton
RingDebug
();
// singleton
};
void
WriteLine
(
String
^
str
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment