Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core 我们在azure Iot edge上有应用程序,并使用azure Iot sdk连接到Iot hub,但我';我没有找到为azure iot sdk启用日志的方法吗?_Asp.net Core_Azure Iot Edge_Azure Iot Sdk - Fatal编程技术网

Asp.net core 我们在azure Iot edge上有应用程序,并使用azure Iot sdk连接到Iot hub,但我';我没有找到为azure iot sdk启用日志的方法吗?

Asp.net core 我们在azure Iot edge上有应用程序,并使用azure Iot sdk连接到Iot hub,但我';我没有找到为azure iot sdk启用日志的方法吗?,asp.net-core,azure-iot-edge,azure-iot-sdk,Asp.net Core,Azure Iot Edge,Azure Iot Sdk,我正在使用azure iot sdk csharp,并且正在我的位置上运行。我已经看到了一些日志语句,它们是由DotNetty.Handlers.Logging编写的,整个应用程序将作为docker映像部署,我不会在docker日志中看到这些日志 internal sealed partial class Logging : EventSource { /// <summary>The single event source instance to use for all l

我正在使用azure iot sdk csharp,并且正在我的位置上运行。我已经看到了一些日志语句,它们是由DotNetty.Handlers.Logging编写的,整个应用程序将作为docker映像部署,我不会在docker日志中看到这些日志

internal sealed partial class Logging : EventSource
{
    /// <summary>The single event source instance to use for all logging.</summary>
    public static readonly Logging Log = new Logging();
    public static new bool IsEnabled => Log.IsEnabled();

    #region Metadata

    public static class Keywords
    {
        public const EventKeywords Default = (EventKeywords)0x0001;
        public const EventKeywords Debug = (EventKeywords)0x0002;
        public const EventKeywords EnterExit = (EventKeywords)0x0004;
    }
   
    [NonEvent]
    public static void Info(object thisOrContextObject, FormattableString formattableString = null, [CallerMemberName] string memberName = null)
    {
        if (IsEnabled)
        {
            DebugValidateArg(thisOrContextObject);
            DebugValidateArg(formattableString);

            Log.Info(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
        }
    }
}
内部密封部分类日志记录:EventSource
{
///用于所有日志记录的单个事件源实例。
公共静态只读日志记录日志=新日志记录();
public static new bool IsEnabled=>Log.IsEnabled();
#区域元数据
公共静态类关键字
{
public const EventKeywords默认值=(EventKeywords)0x0001;
public const EventKeywords Debug=(EventKeywords)0x0002;
public const EventKeywords EnterExit=(EventKeywords)0x0004;
}
[非事件]
公共静态无效信息(对象thisOrContextObject,FormattableString FormattableString=null,[CallerMemberName]字符串memberName=null)
{
如果(已启用)
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(formattableString);
Log.Info(IdOf(thisOrContextObject)、memberName、formattableString!=null?格式(formattableString):无参数);
}
}
}
有人知道如何启用日志吗