This repository has been archived by the owner on Dec 14, 2017. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 133
Update Logging.md #220
Open
richardterris
wants to merge
1
commit into
IdentityServer:gh-pages
Choose a base branch
from
richardterris:patch-1
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update Logging.md #220
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the Serilog logger, don't you need to assign it to the static Log instance? I can't tell from this how IdSvr knows about your logger variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very strange... Last night when I got this working, it produced a good amount of logs and the issue seemed to be that the certificate installed had a key length of 1024 bytes.
Now when I run this, I am getting a log file, but only with the line I add:
logger.Debug("test!");
To try and figure this out, I have commented out the logging setup code in my Startup class and recompiled the project, and the logger creation certainly seems to work with the code in this PR - I assumed what I was doing above was creating an in-memory logger which would live for the duration of my unit test only? Or am I misunderstanding something?
I'm really interested in contributing to this because it's a great project and I'm trying to become more skilled in security in general, but obviously I'm quite at the beginning with this.
I'll keep playing just now to see if I can figure this out and I'll update the PR when I do.
But of course, if I'm doing something wrong please tell me.
Richard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't know too much of how Serilog works internally, but the way IdSvr "knows" about it is that it discovers it via the static Log property that serilog has. So for your unit tests, I'd expect this static property to be set somewhere at initialization time (maybe even statically, as opposed to per-test).