Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-uwp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-uwp
Commits
e30847e6
Commit
e30847e6
authored
8 years ago
by
Nicolas Jager
Browse files
Options
Downloads
Patches
Plain Diff
internal : save debug output to file
Change-Id: Id637ece76a98ad4ad8a45944b1c356cc57f263c9 Tuleap: #1224
parent
6ddd60a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
RingDebug.cpp
+19
-2
19 additions, 2 deletions
RingDebug.cpp
RingDebug.h
+5
-1
5 additions, 1 deletion
RingDebug.h
with
24 additions
and
3 deletions
RingDebug.cpp
+
19
−
2
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
()));
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
;
});
}
This diff is collapsed.
Click to expand it.
RingDebug.h
+
5
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment