Is it possible to enable debug log level on the instance?

I am setting the event type to debug, but the Events page does not display any logs for that level. Is it possible to set it up?

Doesn't work for In-process API and for Script API using "Debug" value for EventType

 EventLogEntryWriteOptions In-Process API Supplementary Type 

 core_v2_eventLog Script API 

No results in Events:

Parents
  • Former Member
    0 Former Member

    Try:

    
    

    using Telligent.Evolution.Components;
    ...
    EventLogs.Write("debug test", "debug test category", -1, EventType.Debug);

  • Debug message output using In-Process API is also not supported. Just to avoid the wrappers, a simple plugin to reproduce the problem:

    using System.Linq;
    using Telligent.Evolution.Extensibility;
    using Telligent.Evolution.Extensibility.Api.Version1;
    using Telligent.Evolution.Extensibility.Version1;
    
    namespace LogLevelTestAssembly
    {
        public class LogLevelTestPlugin : IPlugin
        {
            public string Name => "Log level extension";
            public string Description => string.Empty;
    
            /// <summary>
            /// Log message for each EventType
            /// </summary>
            private void Write(string message)
            {
                var coreLogger = Apis.Get<IEventLog>();
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Information" });
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Warning" });
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Error" });
    
    
    
                // NOTE: debug level
                var debugResponse = coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Debug" });
    
                // NOTE: checking debug response (the output result can be seen in the "Error" EventType category)
                if (debugResponse.HasErrors())
                {
                    var debugOutput = "Debug error message: " + string.Join(",", debugResponse.Errors.Select(e => e.Message).ToArray());
                    coreLogger.Write(debugOutput, new EventLogEntryWriteOptions() { EventType = "Error" });
                }
            }
    
    
            public void Initialize()
            {
                Write($"{Name}. Initialize.");
    
                var coreContents = Apis.Get<IContents>();
                coreContents.Events.AfterCreate += ContentAfterCreate;
            }
    
            private void ContentAfterCreate(ContentAfterCreateEventArgs e)
            {
                Write($"Content created. Id: {e.ContentId}");
            }
        }
    }
    

    Visual result on the event page:

Reply
  • Debug message output using In-Process API is also not supported. Just to avoid the wrappers, a simple plugin to reproduce the problem:

    using System.Linq;
    using Telligent.Evolution.Extensibility;
    using Telligent.Evolution.Extensibility.Api.Version1;
    using Telligent.Evolution.Extensibility.Version1;
    
    namespace LogLevelTestAssembly
    {
        public class LogLevelTestPlugin : IPlugin
        {
            public string Name => "Log level extension";
            public string Description => string.Empty;
    
            /// <summary>
            /// Log message for each EventType
            /// </summary>
            private void Write(string message)
            {
                var coreLogger = Apis.Get<IEventLog>();
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Information" });
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Warning" });
    
                // It works
                coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Error" });
    
    
    
                // NOTE: debug level
                var debugResponse = coreLogger.Write(message, new EventLogEntryWriteOptions() { EventType = "Debug" });
    
                // NOTE: checking debug response (the output result can be seen in the "Error" EventType category)
                if (debugResponse.HasErrors())
                {
                    var debugOutput = "Debug error message: " + string.Join(",", debugResponse.Errors.Select(e => e.Message).ToArray());
                    coreLogger.Write(debugOutput, new EventLogEntryWriteOptions() { EventType = "Error" });
                }
            }
    
    
            public void Initialize()
            {
                Write($"{Name}. Initialize.");
    
                var coreContents = Apis.Get<IContents>();
                coreContents.Events.AfterCreate += ContentAfterCreate;
            }
    
            private void ContentAfterCreate(ContentAfterCreateEventArgs e)
            {
                Write($"Content created. Id: {e.ContentId}");
            }
        }
    }
    

    Visual result on the event page:

Children
No Data