簡體   English   中英

Azure移動服務中的日志錯誤

[英]Log Errors in Azure Mobile Service

我試圖弄清楚如何使用.NET后端從移動服務登錄。 到目前為止,我讀到您可以通過調用以下方法來執行此操作:

ApiController.ApiServices.Log.Info("log string")

如果您位於ApiController中,這很好,因為您可以簡單地使用this.Services ,但是如果您想從控制器之外的其他地方登錄怎么辦? 這有可能嗎?

如果您在自定義控制器中表示“除控制器外”,則可以聲明

public ApiServices Services { get; set; }

然后使用Services.Log.Error("your error")

如果這不是您要的內容,請提供更多信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM