Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
5da98186
Commit
5da98186
authored
Feb 10, 2020
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated member name in win eventlog sink
parent
ff59b079
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
include/spdlog/sinks/win_eventlog_sink.h
include/spdlog/sinks/win_eventlog_sink.h
+10
-9
No files found.
include/spdlog/sinks/win_eventlog_sink.h
View file @
5da98186
...
...
@@ -194,23 +194,23 @@ template<typename Mutex>
class
win_eventlog_sink
:
public
base_sink
<
Mutex
>
{
private:
HANDLE
h
EventL
og_
{
NULL
};
HANDLE
h
_eventl
og_
{
NULL
};
internal
::
sid_t
current_user_sid_
;
std
::
string
source_
;
WORD
event_id_
;
HANDLE
event_log_handle
()
{
if
(
!
h
EventL
og_
)
if
(
!
h
_eventl
og_
)
{
h
EventL
og_
=
::
RegisterEventSource
(
nullptr
,
source_
.
c_str
());
if
(
!
h
EventLog_
||
hEventL
og_
==
(
HANDLE
)
ERROR_ACCESS_DENIED
)
h
_eventl
og_
=
::
RegisterEventSource
(
nullptr
,
source_
.
c_str
());
if
(
!
h
_eventlog_
||
h_eventl
og_
==
(
HANDLE
)
ERROR_ACCESS_DENIED
)
{
SPDLOG_THROW
(
internal
::
win32_error
(
"RegisterEventSource"
));
}
}
return
h
EventL
og_
;
return
h
_eventl
og_
;
}
protected:
...
...
@@ -241,7 +241,7 @@ public:
{
try
{
current_user_sid_
=
internal
::
sid_t
::
get_current_user_sid
();
current_user_sid_
=
internal
::
sid_t
::
sid_t
();
}
catch
(...)
{
...
...
@@ -250,10 +250,11 @@ public:
}
}
~
win_eventlog_sink
()
~
win_eventlog_sink
()
override
{
if
(
hEventLog_
)
DeregisterEventSource
(
hEventLog_
);
if
(
h_eventlog_
)
{
DeregisterEventSource
(
h_eventlog_
);
}
}
};
...
...
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