C# 클래스 JSNLog.Infrastructure.RequestId

파일 보기 프로젝트 열기: mperdeck/jsnlog 1 사용 예제들

공개 메소드들

메소드 설명
GetLogRequestId ( this httpContext ) : string

Gets the request id from an HTTP header in the request. Every log request sent by jsnlog.js should have such a header. However, requests not sent by jsnlog.js will not have this header obviously. If the request id cannot be found, returns null.

GetLogRequestId ( string>.this headers ) : string
GetRequestId ( this httpContext ) : string

Gets an id, that is unique to this request. That is, for the same request, this method always returns the same string.

비공개 메소드들

메소드 설명
CreateNewRequestId ( ) : string
GetRequestIdFromContext ( HttpContext httpContext ) : string
IISRequestId ( HttpContext httpContext ) : string

Creates an ID that is unique hopefully. This method initially tries to use the request id that IIS already uses internally. This allows us to correlate across even more log files. If this fails, for example if this is not part of a web request, than it uses a random GUID. See http://blog.tatham.oddie.com.au/2012/02/07/code-request-correlation-in-asp-net/

SetRequestIdInContext ( HttpContext httpContext, string requestId ) : void

메소드 상세

GetLogRequestId() 공개 정적인 메소드

Gets the request id from an HTTP header in the request. Every log request sent by jsnlog.js should have such a header. However, requests not sent by jsnlog.js will not have this header obviously. If the request id cannot be found, returns null.
public static GetLogRequestId ( this httpContext ) : string
httpContext this
리턴 string

GetLogRequestId() 공개 정적인 메소드

public static GetLogRequestId ( string>.this headers ) : string
headers string>.this
리턴 string

GetRequestId() 공개 정적인 메소드

Gets an id, that is unique to this request. That is, for the same request, this method always returns the same string.
public static GetRequestId ( this httpContext ) : string
httpContext this
리턴 string